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, _ exportable As Boolean _ ) |
| C# |
|---|
public void AssociateWith ( X509Certificate certificate, bool exportable ) |
| Visual C++ |
|---|
public: void AssociateWith ( X509Certificate^ certificate, bool exportable ) |
Parameters
- certificate
- System.Security.Cryptography.X509Certificates.X509Certificate
An X509Certificate instance to associate the key with.
- exportable
- System.Boolean
true if the key should be marked as exportable, false otherwise.
Exceptions
| Exception | Condition |
|---|---|
| System.Security.Cryptography.CryptographicException | An error occurs while associating the private key with the certificate. |