Ejemplo n.º 1
0
 public void IsSignatureAlgorithmSupported_WhenSupported_ReturnsTrue(string signatureAlgorithm, string expectedSignatureAlgorithmOid)
 {
     using (var certificate = SigningTestUtility.GenerateCertificate(
                "test",
                generator => { },
                signatureAlgorithm))
     {
         Assert.Equal(expectedSignatureAlgorithmOid, certificate.SignatureAlgorithm.Value);
         Assert.True(SigningUtility.IsSignatureAlgorithmSupported(certificate));
     }
 }
Ejemplo n.º 2
0
 public void IsSignatureAlgorithmSupported_WhenUnsupported_ReturnsFalse()
 {
     using (var certificate = SigningTestUtility.GenerateCertificate(
                "test",
                generator => { },
                "SHA256WITHRSAANDMGF1"))
     {
         // RSASSA-PSS
         Assert.Equal("1.2.840.113549.1.1.10", certificate.SignatureAlgorithm.Value);
         Assert.False(SigningUtility.IsSignatureAlgorithmSupported(certificate));
     }
 }