CertificateRequest Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| CertificateRequest(X500DistinguishedName, CompositeMLDsa) |
Create a CertificateRequest for the specified subject name and Composite ML-DSA key. |
| CertificateRequest(X500DistinguishedName, MLDsa) |
Create a CertificateRequest for the specified subject name and ML-DSA key. |
| CertificateRequest(X500DistinguishedName, SlhDsa) |
Create a CertificateRequest for the specified subject name and SLH-DSA key. |
| CertificateRequest(String, CompositeMLDsa) |
Create a CertificateRequest for the specified subject name and Composite ML-DSA key. |
| CertificateRequest(String, MLDsa) |
Create a CertificateRequest for the specified subject name and ML-DSA key. |
| CertificateRequest(String, SlhDsa) |
Create a CertificateRequest for the specified subject name and SLH-DSA key. |
| CertificateRequest(X500DistinguishedName, ECDsa, HashAlgorithmName) |
Initializes a new instance of the CertificateRequest class using the specified subject name, ECDSA key, and hash algorithm. |
| CertificateRequest(X500DistinguishedName, PublicKey, HashAlgorithmName) |
Initializes a new instance of the CertificateRequest class using the specified subject name, encoded public key, and hash algorithm. |
| CertificateRequest(String, ECDsa, HashAlgorithmName) |
Initializes a new instance of the CertificateRequest class using the specified subject name, ECDSA key, and hash algorithm. |
| CertificateRequest(X500DistinguishedName, RSA, HashAlgorithmName, RSASignaturePadding) |
Initializes a new instance of the CertificateRequest class using the specified subject name, RSA key, and hash algorithm. |
| CertificateRequest(X500DistinguishedName, PublicKey, HashAlgorithmName, RSASignaturePadding) |
Creates a CertificateRequest for the specified subject name, encoded public key, hash algorithm, and RSA signature padding. |
| CertificateRequest(String, RSA, HashAlgorithmName, RSASignaturePadding) |
Initializes a new instance of the CertificateRequest class using the specified subject name, RSA key, and hash algorithm. |
CertificateRequest(X500DistinguishedName, CompositeMLDsa)
Create a CertificateRequest for the specified subject name and Composite ML-DSA key.
public:
CertificateRequest(System::Security::Cryptography::X509Certificates::X500DistinguishedName ^ subjectName, System::Security::Cryptography::CompositeMLDsa ^ key);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.CompositeMLDsa key);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.X509Certificates.CertificateRequest : System.Security.Cryptography.X509Certificates.X500DistinguishedName * System.Security.Cryptography.CompositeMLDsa -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As X500DistinguishedName, key As CompositeMLDsa)
Parameters
- subjectName
- X500DistinguishedName
The parsed representation of the subject name for the certificate or certificate request.
- key
- CompositeMLDsa
A Composite ML-DSA key whose public key material will be included in the certificate or certificate request.
This key will be used as a private key if CreateSelfSigned(DateTimeOffset, DateTimeOffset) is called.
- Attributes
Exceptions
subjectName or key is null.
Applies to
CertificateRequest(X500DistinguishedName, MLDsa)
- Source:
- CertificateRequest.cs
Create a CertificateRequest for the specified subject name and ML-DSA key.
public:
CertificateRequest(System::Security::Cryptography::X509Certificates::X500DistinguishedName ^ subjectName, System::Security::Cryptography::MLDsa ^ key);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.MLDsa key);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.X509Certificates.CertificateRequest : System.Security.Cryptography.X509Certificates.X500DistinguishedName * System.Security.Cryptography.MLDsa -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As X500DistinguishedName, key As MLDsa)
Parameters
- subjectName
- X500DistinguishedName
The parsed representation of the subject name for the certificate or certificate request.
- key
- MLDsa
An ML-DSA key whose public key material will be included in the certificate or certificate request.
This key will be used as a private key if CreateSelfSigned(DateTimeOffset, DateTimeOffset) is called.
- Attributes
Exceptions
subjectName or key is null.
Applies to
CertificateRequest(X500DistinguishedName, SlhDsa)
Create a CertificateRequest for the specified subject name and SLH-DSA key.
public:
CertificateRequest(System::Security::Cryptography::X509Certificates::X500DistinguishedName ^ subjectName, System::Security::Cryptography::SlhDsa ^ key);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.SlhDsa key);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.X509Certificates.CertificateRequest : System.Security.Cryptography.X509Certificates.X500DistinguishedName * System.Security.Cryptography.SlhDsa -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As X500DistinguishedName, key As SlhDsa)
Parameters
- subjectName
- X500DistinguishedName
The parsed representation of the subject name for the certificate or certificate request.
- key
- SlhDsa
An SLH-DSA key whose public key material will be included in the certificate or certificate request.
This key will be used as a private key if CreateSelfSigned(DateTimeOffset, DateTimeOffset) is called.
- Attributes
Exceptions
subjectName or key is null.
Applies to
CertificateRequest(String, CompositeMLDsa)
Create a CertificateRequest for the specified subject name and Composite ML-DSA key.
public:
CertificateRequest(System::String ^ subjectName, System::Security::Cryptography::CompositeMLDsa ^ key);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CertificateRequest(string subjectName, System.Security.Cryptography.CompositeMLDsa key);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.X509Certificates.CertificateRequest : string * System.Security.Cryptography.CompositeMLDsa -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As String, key As CompositeMLDsa)
Parameters
- subjectName
- String
The parsed representation of the subject name for the certificate or certificate request.
- key
- CompositeMLDsa
A Composite ML-DSA key whose public key material will be included in the certificate or certificate request.
This key will be used as a private key if CreateSelfSigned(DateTimeOffset, DateTimeOffset) is called.
- Attributes
Exceptions
subjectName or key is null.
Applies to
CertificateRequest(String, MLDsa)
- Source:
- CertificateRequest.cs
Create a CertificateRequest for the specified subject name and ML-DSA key.
public:
CertificateRequest(System::String ^ subjectName, System::Security::Cryptography::MLDsa ^ key);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CertificateRequest(string subjectName, System.Security.Cryptography.MLDsa key);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.X509Certificates.CertificateRequest : string * System.Security.Cryptography.MLDsa -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As String, key As MLDsa)
Parameters
- subjectName
- String
The parsed representation of the subject name for the certificate or certificate request.
- key
- MLDsa
An ML-DSA key whose public key material will be included in the certificate or certificate request.
This key will be used as a private key if CreateSelfSigned(DateTimeOffset, DateTimeOffset) is called.
- Attributes
Exceptions
subjectName or key is null.
Applies to
CertificateRequest(String, SlhDsa)
Create a CertificateRequest for the specified subject name and SLH-DSA key.
public:
CertificateRequest(System::String ^ subjectName, System::Security::Cryptography::SlhDsa ^ key);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public CertificateRequest(string subjectName, System.Security.Cryptography.SlhDsa key);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Security.Cryptography.X509Certificates.CertificateRequest : string * System.Security.Cryptography.SlhDsa -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As String, key As SlhDsa)
Parameters
- subjectName
- String
The parsed representation of the subject name for the certificate or certificate request.
- key
- SlhDsa
An SLH-DSA key whose public key material will be included in the certificate or certificate request.
This key will be used as a private key if CreateSelfSigned(DateTimeOffset, DateTimeOffset) is called.
- Attributes
Exceptions
subjectName or key is null.
Applies to
CertificateRequest(X500DistinguishedName, ECDsa, HashAlgorithmName)
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
Initializes a new instance of the CertificateRequest class using the specified subject name, ECDSA key, and hash algorithm.
public:
CertificateRequest(System::Security::Cryptography::X509Certificates::X500DistinguishedName ^ subjectName, System::Security::Cryptography::ECDsa ^ key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.ECDsa key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
new System.Security.Cryptography.X509Certificates.CertificateRequest : System.Security.Cryptography.X509Certificates.X500DistinguishedName * System.Security.Cryptography.ECDsa * System.Security.Cryptography.HashAlgorithmName -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As X500DistinguishedName, key As ECDsa, hashAlgorithm As HashAlgorithmName)
Parameters
- subjectName
- X500DistinguishedName
The parsed representation of the subject name for the certificate or certificate request.
- key
- ECDsa
An ECDSA key whose public key material will be included in the certificate or certificate request. If the CreateSelfSigned(DateTimeOffset, DateTimeOffset) method is called, this key is used as a private key.
- hashAlgorithm
- HashAlgorithmName
The hash algorithm to use when signing the certificate or certificate request.
Exceptions
Applies to
CertificateRequest(X500DistinguishedName, PublicKey, HashAlgorithmName)
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
Initializes a new instance of the CertificateRequest class using the specified subject name, encoded public key, and hash algorithm.
public:
CertificateRequest(System::Security::Cryptography::X509Certificates::X500DistinguishedName ^ subjectName, System::Security::Cryptography::X509Certificates::PublicKey ^ publicKey, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.X509Certificates.PublicKey publicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
new System.Security.Cryptography.X509Certificates.CertificateRequest : System.Security.Cryptography.X509Certificates.X500DistinguishedName * System.Security.Cryptography.X509Certificates.PublicKey * System.Security.Cryptography.HashAlgorithmName -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As X500DistinguishedName, publicKey As PublicKey, hashAlgorithm As HashAlgorithmName)
Parameters
- subjectName
- X500DistinguishedName
The parsed representation of the subject name for the certificate or certificate request.
- publicKey
- PublicKey
The encoded representation of the public key to include in the certificate or certificate request.
- hashAlgorithm
- HashAlgorithmName
The hash algorithm to use when signing the certificate or certificate request.
Exceptions
Applies to
CertificateRequest(String, ECDsa, HashAlgorithmName)
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
Initializes a new instance of the CertificateRequest class using the specified subject name, ECDSA key, and hash algorithm.
public:
CertificateRequest(System::String ^ subjectName, System::Security::Cryptography::ECDsa ^ key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public CertificateRequest(string subjectName, System.Security.Cryptography.ECDsa key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
new System.Security.Cryptography.X509Certificates.CertificateRequest : string * System.Security.Cryptography.ECDsa * System.Security.Cryptography.HashAlgorithmName -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As String, key As ECDsa, hashAlgorithm As HashAlgorithmName)
Parameters
- subjectName
- String
The string representation of the subject name for the certificate or certificate request.
- key
- ECDsa
An ECDSA key whose public key material will be included in the certificate or certificate request. If the CreateSelfSigned(DateTimeOffset, DateTimeOffset) method is called, this key is used as a private key.
- hashAlgorithm
- HashAlgorithmName
The hash algorithm to use when signing the certificate or certificate request.
Exceptions
See also
Applies to
CertificateRequest(X500DistinguishedName, RSA, HashAlgorithmName, RSASignaturePadding)
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
Initializes a new instance of the CertificateRequest class using the specified subject name, RSA key, and hash algorithm.
public:
CertificateRequest(System::Security::Cryptography::X509Certificates::X500DistinguishedName ^ subjectName, System::Security::Cryptography::RSA ^ key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.RSA key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
new System.Security.Cryptography.X509Certificates.CertificateRequest : System.Security.Cryptography.X509Certificates.X500DistinguishedName * System.Security.Cryptography.RSA * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As X500DistinguishedName, key As RSA, hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding)
Parameters
- subjectName
- X500DistinguishedName
The parsed representation of the subject name for the certificate or certificate request.
- key
- RSA
A RSA key whose public key material will be included in the certificate or certificate request. If the CreateSelfSigned(DateTimeOffset, DateTimeOffset) method is called, this key is used as a private key.
- hashAlgorithm
- HashAlgorithmName
The hash algorithm to use when signing the certificate or certificate request.
- padding
- RSASignaturePadding
The RSA signature padding to apply if self-signing or being signed with an X509Certificate2.
Exceptions
Applies to
CertificateRequest(X500DistinguishedName, PublicKey, HashAlgorithmName, RSASignaturePadding)
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
Creates a CertificateRequest for the specified subject name, encoded public key, hash algorithm, and RSA signature padding.
public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.X509Certificates.PublicKey publicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding? rsaSignaturePadding = default);
new System.Security.Cryptography.X509Certificates.CertificateRequest : System.Security.Cryptography.X509Certificates.X500DistinguishedName * System.Security.Cryptography.X509Certificates.PublicKey * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As X500DistinguishedName, publicKey As PublicKey, hashAlgorithm As HashAlgorithmName, Optional rsaSignaturePadding As RSASignaturePadding = Nothing)
Parameters
- subjectName
- X500DistinguishedName
The parsed representation of the subject name for the certificate or certificate request.
- publicKey
- PublicKey
The encoded representation of the public key to include in the certificate or certificate request.
- hashAlgorithm
- HashAlgorithmName
The hash algorithm to use when signing the certificate or certificate request.
- rsaSignaturePadding
- RSASignaturePadding
The RSA signature padding to use when signing this request with an RSA certificate.
Applies to
CertificateRequest(String, RSA, HashAlgorithmName, RSASignaturePadding)
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
- Source:
- CertificateRequest.cs
Initializes a new instance of the CertificateRequest class using the specified subject name, RSA key, and hash algorithm.
public:
CertificateRequest(System::String ^ subjectName, System::Security::Cryptography::RSA ^ key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public CertificateRequest(string subjectName, System.Security.Cryptography.RSA key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
new System.Security.Cryptography.X509Certificates.CertificateRequest : string * System.Security.Cryptography.RSA * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> System.Security.Cryptography.X509Certificates.CertificateRequest
Public Sub New (subjectName As String, key As RSA, hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding)
Parameters
- subjectName
- String
The string representation of the subject name for the certificate or certificate request.
- key
- RSA
A RSA key whose public key material will be included in the certificate or certificate request. If the CreateSelfSigned(DateTimeOffset, DateTimeOffset) method is called, this key is used as a private key.
- hashAlgorithm
- HashAlgorithmName
The hash algorithm to use when signing the certificate or certificate request.
- padding
- RSASignaturePadding
The RSA signature padding to apply if self-signing or being signed with an X509Certificate2.