We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 653ca83 commit 2ffe5c3Copy full SHA for 2ffe5c3
UnitTests/Cryptography/CmsSignerTests.cs
@@ -24,6 +24,7 @@
24
// THE SOFTWARE.
25
//
26
27
+using System.Security.Cryptography;
28
using System.Security.Cryptography.X509Certificates;
29
30
using Org.BouncyCastle.Pkcs;
@@ -153,6 +154,9 @@ public void TestConstructors ()
153
154
try {
155
var cert = new X509Certificate2 (path, password, X509KeyStorageFlags.Exportable);
156
signer = new CmsSigner (cert);
157
+ } catch (CryptographicException cex) {
158
+ if (!path.EndsWith ("\\ec\\smime.pfx", StringComparison.Ordinal) || !cex.Message.Equals ("Keyset does not exist", StringComparison.Ordinal))
159
+ Assert.Fail ($".ctor (X509Certificate2): {cex}");
160
} catch (Exception ex) {
161
Assert.Fail ($".ctor (X509Certificate2): {ex}");
162
}
0 commit comments