Trading Networks 10.7 | Administering and Monitoring B2B Transactions | Trading Networks Built-In Services Reference | Security Folder | Summary of Elements in this Folder | wm.tn.security:setPrimaryCertificate
 
wm.tn.security:setPrimaryCertificate
Sets a certificate as the primary certificate.
Input Parameters
ownerID
String The owner ID of the owner of the certificate to be made primary.
partnerID
String (optional) The partner ID of the owner’s partner for the certificate to be made primary.
usage
String Usage of the certificate to be made primary. Specify one of the following values:
*sign - The private key is used as a signing key for the owner to send digitally signed documents to the partner. The public key is used by the partner to verify the signed document.
*decrypt - The private key is used to decrypt the encrypted document sent to the owner from the partner. Public certificates are used by the partner to encrypt the document.
*ssl - The certificate is used as a client SSL certificate for the owner to establish an SSL connection to the partner's secure server.
certID
String Certificate ID of the certificate which is to be made primary.
Output Parameters
isUpdated
String Indicates if the certificate with the given ID was made the primary certificate, as follows:
*true - The service was successful.
*false - The service was not successful.
Usage Notes
*Before using this service to set a service as the primary certificate, use the wm.tn.security:addCertificateData service to get the certificate ID of a valid certificate for the owner, partner, and usage.
*This service is useful in cases where both of the decryption certificates are valid on the receiver side and the document that is received was encrypted with the secondary certificate. After ascertaining the correct decryption certificate, the certificate is set as the primary.