Framework EDI Reference. Methods and Properties
ediSecurity. ImportCertificatePfx

Imports an X.509 certificate to the certificate store, and associates the certificate to the Cryptographic Service Provider (CSP) key container using the CSP default values set for the security object.

Syntax:

Parameters:

Returns:

Returns an object of type FREDI.ediSecurityCertificate if successful otherwise NULL or an empty object if the operation failed.

Remarks:

When the certificate file is imported to the security object (ediSecurity), the public key of the certificate can be used for encryption and verifying a signature for documents received from the recipient.  The CertificateSubjectName property is set to the certificate's subject name when the certificate is imported.  Also, when importing, the CSP parameters (Service Provider, Provider Type and Key Container), which is set on the security object to specify the default key container,  is used to attempt to match the key container to the certificate.  This is done by matching the certificate's public key to the key container's public key and if a match is found then the association is made.  This allows the certificate to be associated to a private key because where ever the certificate is referenced to digitally sign or decrypt a document, the private key of the associated key container is actually used.  If the certificate is associated to the key container the CertificateSignerName property is also set to the certificate's subject name.