xml.Encryption.setCertificate

Assigns a copy of the X509 certificate to this Encryption object.

Syntax

setCertificate(
   cert xml.CryptoX509 )
  1. cert is the copy of the X509 certificate.

Usage

The certificate will then be added to any further XML document or node encryption.
  • NULL is allowed to avoid the certificate being added.

  • To encrypt using a certificate, you must use the createPublicKey method of the X509 class to obtain the public key embedded in the certificate, and then provide it to the encryption object with above setKeyEncryptionKey method.

In case of error, the method throws an exception and sets the STATUS variable with the appropriate error number.