Certificate.Load Method


Loads the certificate from .pfx or .cer file.

[Visual Basic]
Public Sub Load( _
    certFile As String _
)

Public Sub Load( _
    pfxFile As String, _
    password As String, _
    keyLocation As Certificate.CertificateKeyLocation _
)

Public Sub Load( _
    encodedCertificate() As Byte _
)
[C#]
public void Load(
    string certFile
);

public void Load(
     string pfxFile,
     string password,
     Certificate.CertificateKeyLocation keyLocation
);

public void Load(
    byte[] encodedCertificate
);
[C++]
public: void Load(
    String^ certFile
);

public: void Load(
     String^ pfxFile,
     String^ password,
     Certificate.CertificateKeyLocation keyLocation
);

public: void Load(
    array<unsigned char>^ encodedCertificate,
);
[JScript]
public function Load( 
    certFile : String
);

public function Load( 
    pfxFile : String,
    password : String,
    keyLocation : Certificate.CertificateKeyLocation
);

public function Load( 
    encodedCertificate : Byte[]
);

Parameters

certFile
A full name of *.cer file.
encodedCertificate
The encoded data of certificate.
pfxFile
A full name of *.pfx file.
passowrd
The password of the *.pfx file.
keyLocation
The private keys's storage location, it can be Certificate.CertificateKeyLocation.CRYPT_USER_KEYSET or Certificate.CertificateKeyLocation.CRYPT_MACHINE_KEYSET

Remarks

Load( string certFile ) method is unable to load the certificate for digital signature. To learn more about email digital signature and encryption, please refer to Digital Signature and E-mail Encryption/Decryption section.
To sign and encrypt email content, please refer to EASendMail SMTP Component.

See Also

Mail.VerifySignature Method
Mail.Decrypt Method

Online Tutorials

Verify Digital Signature and Decrypt Email in C# - S/MIME
Verify Digital Signature and Decrypt Email in VB - S/MIME
Verify Digital Signature and Decrypt Email in C++/CLI - S/MIME