public void VerifyChain(X509Certificate[] chain)
{
// Loop over the certificates in the chain
for (int i = 0; i < chain.Length; ++i) {
X509Certificate cert = chain[i];
// check if the certificate was/is valid
cert.CheckValidity(signDate);
// check if the previous certificate was issued by this certificate
if (i > 0)
chain[i-1].Verify(chain[i].GetPublicKey());
}
LOGGER.Info("All certificates are valid on " + signDate.ToString("F"));
}