Fixed bug 18482. Reseting all private key values to null is required because a new...
authormarcos henrich <marcoshenrich@gmail.com>
Tue, 27 May 2014 11:11:32 +0000 (12:11 +0100)
committermarcos henrich <marcoshenrich@gmail.com>
Tue, 27 May 2014 11:11:32 +0000 (12:11 +0100)
mcs/class/Mono.Security/Mono.Security.Cryptography/RSAManaged.cs

index 9c406a200c73b9c557c78bac455378663640b2a3..5d798ac5d22188b21bbd7d9c6aae6bbe7e1cf1ec 100644 (file)
@@ -303,6 +303,10 @@ namespace Mono.Security.Cryptography {
        
                        e = new BigInteger (parameters.Exponent);
                        n = new BigInteger (parameters.Modulus);
+                       
+                       //reset all private key values to null
+                       d = dp = dq = qInv = p = q = null;
+                       
                        // only if the private key is present
                        if (parameters.D != null)
                                d = new BigInteger (parameters.D);