@@ -26,7 +26,6 @@ namespace System.Security.Cryptography
26
26
{
27
27
internal static partial class CngLightup
28
28
{
29
- private const string DsaOid = "1.2.840.10040.4.1" ;
30
29
private const string RsaOid = "1.2.840.113549.1.1.1" ;
31
30
32
31
private const string HashAlgorithmNameTypeName = "System.Security.Cryptography.HashAlgorithmName" ;
@@ -57,9 +56,6 @@ internal static partial class CngLightup
57
56
58
57
private static readonly Lazy < bool > s_preferRsaCng = new Lazy < bool > ( DetectRsaCngSupport ) ;
59
58
60
- private static volatile Func < X509Certificate2 , DSA > s_getDsaPublicKey ;
61
- private static volatile Func < X509Certificate2 , DSA > s_getDsaPrivateKey ;
62
-
63
59
private static volatile Func < X509Certificate2 , RSA > s_getRsaPublicKey ;
64
60
private static volatile Func < X509Certificate2 , RSA > s_getRsaPrivateKey ;
65
61
private static volatile Func < RSA , byte [ ] , string , byte [ ] > s_rsaPkcs1SignMethod ;
@@ -112,30 +108,6 @@ internal static RSA GetRSAPrivateKey(X509Certificate2 cert)
112
108
return s_getRsaPrivateKey ( cert ) ;
113
109
}
114
110
115
- internal static DSA GetDSAPublicKey ( X509Certificate2 cert )
116
- {
117
- if ( s_getDsaPublicKey == null )
118
- {
119
- s_getDsaPublicKey =
120
- BindCoreDelegate < DSA > ( "DSA" , isPublic : true ) ??
121
- BindGetCapiPublicKey < DSA , DSACryptoServiceProvider > ( DsaOid ) ;
122
- }
123
-
124
- return s_getDsaPublicKey ( cert ) ;
125
- }
126
-
127
- internal static DSA GetDSAPrivateKey ( X509Certificate2 cert )
128
- {
129
- if ( s_getDsaPrivateKey == null )
130
- {
131
- s_getDsaPrivateKey =
132
- BindCoreDelegate < DSA > ( "DSA" , isPublic : false ) ??
133
- BindGetCapiPrivateKey < DSA > ( DsaOid , csp => new DSACryptoServiceProvider ( csp ) ) ;
134
- }
135
-
136
- return s_getDsaPrivateKey ( cert ) ;
137
- }
138
-
139
111
#if ! CNG_LIGHTUP_NO_SYSTEM_CORE
140
112
internal static ECDsa GetECDsaPublicKey ( X509Certificate2 cert )
141
113
{
@@ -526,7 +498,6 @@ private static Func<X509Certificate2, T> BindCoreDelegate<T>(string algorithmNam
526
498
// Load System.Core.dll and load the appropriate extension class
527
499
// (one of
528
500
// System.Security.Cryptography.X509Certificates.RSACertificateExtensions
529
- // System.Security.Cryptography.X509Certificates.DSACertificateExtensions
530
501
// System.Security.Cryptography.X509Certificates.ECDsaCertificateExtensions
531
502
// )
532
503
string typeName = "System.Security.Cryptography.X509Certificates." + algorithmName + "CertificateExtensions" ;
@@ -547,8 +518,6 @@ private static Func<X509Certificate2, T> BindCoreDelegate<T>(string algorithmNam
547
518
// (one of
548
519
// GetRSAPublicKey(this X509Certificate2 c)
549
520
// GetRSAPrivateKey(this X509Certificate2 c)
550
- // GetDSAPublicKey(this X509Certificate2 c)
551
- // GetDSAPrivateKey(this X509Certificate2 c)
552
521
// GetECDsaPublicKey(this X509Certificate2 c)
553
522
// GetECDsaPrivateKey(this X509Certificate2 c)
554
523
// )
0 commit comments