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
[System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability","CA1416:Validate platform compatibility",Justification="Other methods are available but RSA is just for windows")]
970
964
publicvoidLoadX509Certificate(X509Chainchain)
971
965
{
972
966
if(chain==null)
@@ -976,17 +970,9 @@ public void LoadX509Certificate(X509Chain chain)
976
970
977
971
varmainCert=chain.ChainElements[0].Certificate;
978
972
979
-
#if NETSTANDARD2_1||NET6_0_OR_GREATER
980
-
#pragma warning disable SYSLIB0028// Type or member is obsolete
981
-
_PrivateKeyRsa=((RSACng)mainCert.PrivateKey).Key;
982
-
#pragma warning restore SYSLIB0028// Type or member is obsolete
983
-
#pragma warning disable SYSLIB0027// Type or member is obsolete
984
-
PublicKey=((RSACng)mainCert.PublicKey.Key).Key;
985
-
#pragma warning restore SYSLIB0027// Type or member is obsolete
thrownewArgumentException("Need private key for non-RSA Algorithms");
@@ -304,34 +299,21 @@ public static byte[] Sign(AsymmetricKeyParameter privateKey, RSACryptoServicePro
304
299
}
305
300
306
301
[System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability","CA1416:Validate platform compatibility",Justification="Other methods are available but RSA is just for windows")]
0 commit comments