Associates the certificate with a private key from a PVK file.

Namespace: LLCryptoLib.Security.Certificates
Assembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)

Syntax

C#
public void AssociateWithPrivateKey(
	string pvkFile,
	string password,
	bool exportable
)
Visual Basic
Public Sub AssociateWithPrivateKey ( _
	pvkFile As String, _
	password As String, _
	exportable As Boolean _
)
Visual C++
public:
void AssociateWithPrivateKey(
	String^ pvkFile, 
	String^ password, 
	bool exportable
)

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.
exportable
Type: System..::..Boolean
true if the private key should be marked exportable, false otherwise.

Remarks

The password can be a null reference (Nothing in Visual Basic) if the private key is not encrypted.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThe PVK file is encrypted and password is a null reference (Nothing in Visual Basic).
System.IO..::..FileNotFoundExceptionThe specified file could not be found.
LLCryptoLib.Security.Certificates..::..CertificateExceptionAn error occurs while importing the private key.

See Also