public Verify ( X509Certificate signCert, X509Certificate issuerCert, DateTime signDate ) : List |
||
signCert | X509Certificate | |
issuerCert | X509Certificate | |
signDate | DateTime | |
return | List |
/** * Checks the validity of the certificate, and calls the next * verifier in the chain, if any. * @param signCert the certificate that needs to be checked * @param issuerCert its issuer * @param signDate the date the certificate needs to be valid * @return a list of <code>VerificationOK</code> objects. * The list will be empty if the certificate couldn't be verified. * @throws GeneralSecurityException * @throws IOException */ virtual public List<VerificationOK> Verify(X509Certificate signCert, X509Certificate issuerCert, DateTime signDate) { // Check if the certificate is valid on the signDate //if (signDate != null) signCert.CheckValidity(signDate); // Check if the signature is valid if (issuerCert != null) { signCert.Verify(issuerCert.GetPublicKey()); } // Also in case, the certificate is self-signed else { signCert.Verify(signCert.GetPublicKey()); } List<VerificationOK> result = new List<VerificationOK>(); if (verifier != null) result.AddRange(verifier.Verify(signCert, issuerCert, signDate)); return result; }