+2006-09-05 Sebastien Pouliot <sebastien@ximian.com>
+
+ * RSAManaged.cs: Fix a NRE when decrypting without a private key
+ (#79269). We now throw a CryptographicException with an appropriate
+ text message.
+
2006-06-15 Sebastien Pouliot <sebastien@ximian.com>
* CryptoTools.cs: Fix offset in block processor. This fix the HMAC
//
// (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
// Portions (C) 2003 Ben Maurer
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
//
// Key generation translated from Bouncy Castle JCE (http://www.bouncycastle.org/)
// See bouncycastle.txt for license.
// m = m2 + q * h;
output = m2 + q * h;
}
- } else {
+ } else if (!PublicOnly) {
// m = c^d mod n
output = input.ModPow (d, n);
+ } else {
+ throw new CryptographicException (Locale.GetText ("Missing private key to decrypt value."));
}
if (keyBlinding) {