You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/OpenSslX509CertificateReader.cs
Copy file name to clipboardExpand all lines: src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Windows/CertificatePal.PrivateKey.cs
+8-108Lines changed: 8 additions & 108 deletions
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,11 @@
2
2
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// check that the public key in the certificate corresponds to the private key passed in.
83
-
//
84
-
// note that it should be legal to set a key which matches in every aspect but the usage
85
-
// i.e. to use a CALG_RSA_KEYX private key to match a CALG_RSA_SIGN public key. A
86
-
// PUBLICKEYBLOB is defined as:
87
-
//
88
-
// BLOBHEADER publickeystruc
89
-
// RSAPUBKEY rsapubkey
90
-
// BYTE modulus[rsapubkey.bitlen/8]
91
-
//
92
-
// To allow keys which differ by key usage only, we skip over the BLOBHEADER of the key,
93
-
// and start comparing bytes at the RSAPUBKEY structure.
94
-
unsafe
95
-
{
96
-
// This cast is safe because via our contract with our caller, "publicKey" is the Key property of a PublicKey object that this Pal class manufactured in the first place.
97
-
// Since we manufactured the PublicKey, we know the real types of the object.
Copy file name to clipboardExpand all lines: src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/RSACertificateExtensions.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ public static RSA GetRSAPrivateKey(this X509Certificate2 certificate)
52
52
53
53
// When the CNG contract comes online this needs to return an RsaCng on Windows, unless CNG reports
54
54
// an error, then try falling back to CAPI (for CAPI-only smartcards).
0 commit comments