public bool Verify(byte[] hash, Certificate[] trustedRootCAs) { if (AsymmetricCryptoKey.Verify(hash, _signedHash, _hashAlgo, _signingCert)) { _signingCert.Verify(trustedRootCAs); return(true); } else { return(false); } }
private static bool IsValid(Certificate certToCheck, DateTime revokedOnUTC, byte[] signature, string hashAlgo) { Certificate signingCert; if (certToCheck.Type == CertificateType.RootCA) { signingCert = certToCheck; } else { signingCert = certToCheck.IssuerSignature.SigningCertificate; } return(AsymmetricCryptoKey.Verify(GetHash(hashAlgo, certToCheck.SerialNumber, revokedOnUTC), signature, hashAlgo, signingCert)); }
public bool Verify(byte[] hash, Certificate signingCert) { return(AsymmetricCryptoKey.Verify(hash, _signedHash, _hashAlgo, signingCert)); }