Creates and returns a self-signed 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 Shared Function Create ( _ key As RSACryptoServiceProvider, _ issuerName As String _ ) As X509Certificate |
C# |
---|
public static X509Certificate Create ( RSACryptoServiceProvider key, string issuerName ) |
Visual C++ |
---|
public: static X509Certificate^ Create ( RSACryptoServiceProvider^ key, String^ issuerName ) |
Parameters
- key
- System.Security.Cryptography.RSACryptoServiceProvider
The key of the certificate.
- issuerName
- System.String
The encoded common name of the issuer.
Return Value
An X509Certificate instance.Exceptions
Exception | Condition |
---|---|
System.Security.Cryptography.CryptographicException | An error occurs while creating the self-signed certificate. |