public void Ocsp() { var caCertificate = CertificateProvider.GenerateCertificateAuthorityCertificate("Certificate Authority - Graham Miller"); var leafCertificate = CertificateProvider.GenerateSignedCertificateWithOcsp("Graham Miller", caCertificate); Verify(leafCertificate); }
public void OcspFromSelfSignedCertificate() { var caCertificate = CertificateProvider.GenerateCertificateAuthorityCertificate("Certificate Authority - Graham Miller"); var leafCertificate = CertificateProvider.GenerateSignedCertificateWithOcsp("Graham Miller", caCertificate); WriteCertificateExtensions(leafCertificate); }
public void VerifyCertificate() { // create certificates var caCertificate = CertificateProvider.GenerateCertificateAuthorityCertificate("Certificate Authority - Graham Miller"); var leafCertificate = CertificateProvider.GenerateSignedCertificate("Graham Miller", caCertificate); Assert.That(caCertificate.Verify(), Is.False); Assert.That(leafCertificate.Verify(), Is.False); Assert.That(Verify(leafCertificate), Is.False); AddCertificateToStore(caCertificate); Assert.That(caCertificate.Verify(), Is.True); Assert.That(leafCertificate.Verify(), Is.False); Assert.That(Verify(leafCertificate), Is.True); RemoveCertificateFromStore(caCertificate); Assert.That(caCertificate.Verify(), Is.False); Assert.That(leafCertificate.Verify(), Is.False); Assert.That(Verify(leafCertificate), Is.False); }