Ejemplo n.º 1
0
 /// <summary>
 /// Gets the <see cref="DSA" /> private key from the certificate or null if the certificate does not have a DSA private key.
 /// </summary>
 public static DSA GetDSAPrivateKey(this X509Certificate2 certificate)
 {
     return(certificate.GetPrivateKey <DSA>());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the <see cref="ECDsa" /> private key from the certificate or null if the certificate does not have an ECDsa private key.
 /// </summary>
 public static ECDsa?GetECDsaPrivateKey(this X509Certificate2 certificate)
 {
     return(certificate.GetPrivateKey <ECDsa>(cert => HasECDsaKeyUsage(cert)));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets the <see cref="RSA" /> private key from the certificate or null if the certificate does not have an RSA private key.
 /// </summary>
 public static RSA?GetRSAPrivateKey(this X509Certificate2 certificate)
 {
     return(certificate.GetPrivateKey <RSA>());
 }
 public static ECDsa GetECDsaPrivateKey(this X509Certificate2 certificate)
 {
     return(certificate.GetPrivateKey <ECDsa>());
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets the <see cref="Gost3410_2012_512" /> private key from the certificate or null if the certificate does not have an Gost3410_2012_512 private key.
 /// </summary>
 public static Gost3410_2012_512 GetGost3410_2012_512PrivateKey(this X509Certificate2 certificate)
 {
     return(certificate.GetPrivateKey <Gost3410_2012_512>());
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Gets the <see cref="Gost3410" /> private key from the certificate or null if the certificate does not have an Gost3410 private key.
 /// </summary>
 public static Gost3410 GetGost3410PrivateKey(this X509Certificate2 certificate)
 {
     return(certificate.GetPrivateKey <Gost3410>());
 }