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