コード例 #1
0
        public bool Verify(byte[] hash, Certificate[] trustedRootCAs)
        {
            if (AsymmetricCryptoKey.Verify(hash, _signedHash, _hashAlgo, _signingCert))
            {
                _signingCert.Verify(trustedRootCAs);

                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 public bool Verify(byte[] hash, Certificate signingCert)
 {
     return(AsymmetricCryptoKey.Verify(hash, _signedHash, _hashAlgo, signingCert));
 }