Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Security.​Cryptography.​X509Certificates.​DSACertificateExtensions

Assembly: System.Security.Cryptography

Inheritance: object → DSACertificateExtensions

Provides extension methods for retrieving <see cref="T:System.Security.Cryptography.DSA" /> implementations for the public and private keys of an <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> .

Methods

public static X509Certificate2
CopyWithPrivateKey​(X509Certificate2 certificate, DSA privateKey)
Combines a private key with the public key of a <see cref="T:System.Security.Cryptography.DSA" /> certificate to generate a new DSA certificate.
Returns A new DSA certificate with the <see cref="P:System.Security.Cryptography.X509Certificates.X509Certificate2.HasPrivateKey" /> property set to <see langword="true" /> . The input DSA certificate object isn't modified.
certificate The DSA certificate.
privateKey The private DSA key.
public static DSA
GetDSAPrivateKey​(X509Certificate2 certificate)
Gets the <see cref="T:System.Security.Cryptography.DSA" /> private key from the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> .
Returns The private key, or <see langword="null" /> if the certificate does not have a DSA private key.
certificate The certificate.
public static DSA
GetDSAPublicKey​(X509Certificate2 certificate)
Gets the <see cref="T:System.Security.Cryptography.DSA" /> public key from the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> .
Returns The public key, or <see langword="null" /> if the certificate does not have a DSA public key.
certificate The certificate.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object