Associates the certificate with a private key from a PVK file.
Namespace: LLCryptoLib.Security.CertificatesAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
| C# |
|---|
public void AssociateWithPrivateKey( string pvkFile, string password ) |
| Visual Basic |
|---|
Public Sub AssociateWithPrivateKey ( _ pvkFile As String, _ password As String _ ) |
| Visual C++ |
|---|
public: void AssociateWithPrivateKey( String^ pvkFile, String^ password ) |
Parameters
- pvkFile
- Type: System..::..String
The path to the PVK file to open.
- password
- Type: System..::..String
The password used to encrypt the private key.
Remarks
The password can be a null reference (Nothing in Visual Basic) if the private key is not encrypted.
The private key will not be exportable.
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | The PVK file is encrypted and password is a null reference (Nothing in Visual Basic). |
| System.IO..::..FileNotFoundException | The specified file could not be found. |
| LLCryptoLib.Security.Certificates..::..CertificateException | An error occurs while importing the private key. |