Associates this private key instance with the corresponding X509 certificate.
Namespace: Org.Mentalis.Security.Tools
Assembly: Org.Mentalis.Security.Tools (in Org.Mentalis.Security.Tools)
Version: 1.0.0.0
Syntax
Visual Basic (Declaration) |
---|
Public Sub AssociateWith ( _ certificate As X509Certificate _ ) |
C# |
---|
public void AssociateWith ( X509Certificate certificate ) |
Visual C++ |
---|
public: void AssociateWith ( X509Certificate^ certificate ) |
Parameters
- certificate
- System.Security.Cryptography.X509Certificates.X509Certificate
An X509Certificate instance to associate the key with.
Remarks
The key will be imported as an exportable key.
Exceptions
Exception | Condition |
---|---|
System.Security.Cryptography.CryptographicException | An error occurs while associating the private key with the certificate. |