summary refs log tree commit diff
path: root/crypto/src/security/DotNetUtilities.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-03-26 17:15:53 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-03-26 17:15:53 +0700
commit47c7ecf546892d8cacadbd3ef3a946e326d6d6c2 (patch)
tree2faed9ab64b982acc0c1cf5f95167de2dadcf6f7 /crypto/src/security/DotNetUtilities.cs
parentRetain the OID actually used when initialized by keysize (diff)
downloadBouncyCastle.NET-ed25519-47c7ecf546892d8cacadbd3ef3a946e326d6d6c2.tar.xz
Provide a KeyContainerName when creating an RSACryptoServiceProvider
- Thanks to Frederik Carlier for reporting and providing a fix (see JIRA BMA-130)
Diffstat (limited to '')
-rw-r--r--crypto/src/security/DotNetUtilities.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/src/security/DotNetUtilities.cs b/crypto/src/security/DotNetUtilities.cs
index d50e17d39..732b5e075 100644
--- a/crypto/src/security/DotNetUtilities.cs
+++ b/crypto/src/security/DotNetUtilities.cs
@@ -233,7 +233,9 @@ namespace Org.BouncyCastle.Security
 
         private static RSA CreateRSAProvider(RSAParameters rp)
         {
-            RSACryptoServiceProvider rsaCsp = new RSACryptoServiceProvider();
+            CspParameters csp = new CspParameters();
+            csp.KeyContainerName = string.Format("BouncyCastle-{0}", Guid.NewGuid());
+            RSACryptoServiceProvider rsaCsp = new RSACryptoServiceProvider(csp);
             rsaCsp.ImportParameters(rp);
             return rsaCsp;
         }