public void Setup_LoadCert() { signingCert1 = Cert.LoadFromPfx("Certs/ca1.pfx_testonly_donotuse", ""); signingCert2 = Cert.LoadFromPfx("Certs/cert1.pfx_testonly_donotuse", ""); verifyCert1 = signingCert1.RemovePrivateKey(); verifyCert2 = signingCert2.RemovePrivateKey(); Assert.True(signingCert1.HasPrivateKey); Assert.True(signingCert2.HasPrivateKey); Assert.False(verifyCert1.HasPrivateKey); Assert.False(verifyCert2.HasPrivateKey); }
public void SigningPerformance() { var results = GetTestSizeString(); var hItem = new HashableBytes(GetBytes()); var signingCert = Cert.LoadFromPfx("Certs/ca1.pfx_testonly_donotuse", ""); foreach (HashProvider provider in Enum.GetValues(typeof(HashProvider))) { long hashCount = 0; DateTime startTime = DateTime.Now; while ((startTime + TestLength) > DateTime.Now) { hItem.ComputeHash(provider, signingCert); hashCount++; } results += GetResultString(provider, hashCount); } Assert.Pass(results); }
public void Setup_LoadCert() { signingCert = Cert.LoadFromPfx("cert1.pfx_testonly_donotuse", ""); Assert.True(signingCert.HasPrivateKey); }