예제 #1
0
        public void testInjectRefereneValue_noInjection_getPolicyValue_assertException()
        {
            var    field  = new SignatureAlgorithmField();
            Action action = () => field.GetPolicyValue();

            action.ShouldThrow <InvalidOperationException>();
        }
        public void testInjectReferenceValue_sha256RSA_assertAlgorithm()
        {

            var cert = new X509Certificate2(@"resources/certs/CernerDirect DevCert Provider CA.der");
            var field = new SignatureAlgorithmField();
            field.InjectReferenceValue(cert);
            field.GetPolicyValue().GetPolicyValue().Should().Be(SignatureAlgorithmIdentifier.SHA256RSA.OID);
        }
        public void TestInjectRefereneValue_AiaDoesNotExist_NotRequired_AssertValueEmpty()
        {

            var cert = new X509Certificate2(@"resources/certs/altNameOnly.der");
            var field = new SignatureAlgorithmField();
            field.InjectReferenceValue(cert);
            field.GetPolicyValue().GetPolicyValue().Should().Be(SignatureAlgorithmIdentifier.SHA1RSA.OID);
        }
예제 #4
0
        public void testInjectReferenceValue_sha256RSA_assertAlgorithm()
        {
            var cert  = new X509Certificate2(@"resources/certs/CernerDirect DevCert Provider CA.der");
            var field = new SignatureAlgorithmField();

            field.InjectReferenceValue(cert);
            field.GetPolicyValue().GetPolicyValue().Should().Be(SignatureAlgorithmIdentifier.SHA256RSA.OID);
        }
예제 #5
0
        public void TestInjectRefereneValue_AiaDoesNotExist_NotRequired_AssertValueEmpty()
        {
            var cert  = new X509Certificate2(@"resources/certs/altNameOnly.der");
            var field = new SignatureAlgorithmField();

            field.InjectReferenceValue(cert);
            field.GetPolicyValue().GetPolicyValue().Should().Be(SignatureAlgorithmIdentifier.SHA1RSA.OID);
        }
 public void testInjectRefereneValue_noInjection_getPolicyValue_assertException()
 {
     var field = new SignatureAlgorithmField();
     Action action = () => field.GetPolicyValue();
     action.ShouldThrow<InvalidOperationException>();
 }