Skip to content

Commit f05554e

Browse files
committed
remove non-persist pfx from file test for now
#31
1 parent 9d673fe commit f05554e

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/System.Security.Cryptography.X509Certificates/tests/GostPfxTests.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,26 @@ public static void ImportGostPfxWithNonPersistKey()
6767
}
6868
}
6969

70-
[Fact]
71-
public static void ImportGostPfxFromFileWithNonPersistKey()
72-
{
73-
var path = "cert.pfx";
74-
File.WriteAllBytes(path, GostPfxTests.Gost2012_256Pfx);
70+
//[Fact]
71+
//public static void ImportGostPfxFromFileWithNonPersistKey()
72+
//{
73+
// var path = "cert.pfx";
74+
// File.WriteAllBytes(path, GostPfxTests.Gost2012_256Pfx);
7575

76-
using (var certificate = new X509Certificate2(
77-
path,
78-
"1",
79-
X509KeyStorageFlags.CspNoPersistKeySet))
80-
{
81-
var dataToBeSigned = new byte[] { 0 };
82-
var privateKey = certificate.PrivateKey as Gost3410_2012_256CryptoServiceProvider;
83-
var publicKey = certificate.PublicKey.Key as Gost3410_2012_256CryptoServiceProvider;
76+
// using (var certificate = new X509Certificate2(
77+
// path,
78+
// "1",
79+
// X509KeyStorageFlags.CspNoPersistKeySet))
80+
// {
81+
// var dataToBeSigned = new byte[] { 0 };
82+
// var privateKey = certificate.PrivateKey as Gost3410_2012_256CryptoServiceProvider;
83+
// var publicKey = certificate.PublicKey.Key as Gost3410_2012_256CryptoServiceProvider;
8484

85-
var signature = privateKey.SignData(dataToBeSigned, HashAlgorithmName.Gost3411_2012_256);
86-
var result = publicKey.VerifyData(dataToBeSigned, signature, HashAlgorithmName.Gost3411_2012_256);
85+
// var signature = privateKey.SignData(dataToBeSigned, HashAlgorithmName.Gost3411_2012_256);
86+
// var result = publicKey.VerifyData(dataToBeSigned, signature, HashAlgorithmName.Gost3411_2012_256);
8787

88-
Assert.True(result);
89-
}
90-
}
88+
// Assert.True(result);
89+
// }
90+
//}
9191
}
9292
}

0 commit comments

Comments
 (0)