public void IsSignatureAlgorithmSupported_WhenUnsupported_ReturnsFalse() { using (var certificate = _fixture.GetRsaSsaPssCertificate()) { // RSASSA-PSS Assert.Equal("1.2.840.113549.1.1.10", certificate.SignatureAlgorithm.Value); Assert.False(CertificateUtility.IsSignatureAlgorithmSupported(certificate)); } }
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(CertificateUtility.IsSignatureAlgorithmSupported(certificate)); } }
public void IsSignatureAlgorithmSupported_WhenSupported_ReturnsTrue(Common.HashAlgorithmName algorithm, string expectedSignatureAlgorithmOid) { using (var certificate = SigningTestUtility.GenerateCertificate( "test", generator => { }, algorithm, RSASignaturePaddingMode.Pkcs1)) { Assert.Equal(expectedSignatureAlgorithmOid, certificate.SignatureAlgorithm.Value); Assert.True(CertificateUtility.IsSignatureAlgorithmSupported(certificate)); } }