by Richard [rgaren at dot dot state dot tx dot us] posted on 2004/09/08 |
|
Does the VerifyChain method check to see if the issuer of my signingCertificate is one of the members of certStore? Additionally does it check to see if signingCertificate was indeed created by that member (if it exists) of certStore?
Thanks,
Richard
<code>
Certificate signingCertificate = Certificate.CreateFromBase64String(sCertificate);
Certificate subCertificate = Certificate.CreateFromCerFile(subFile); // DER encoded binary X.509 (.CER)
Certificate rootCertificate = Certificate.CreateFromCerFile(rootFile); // DER encoded binary X.509 (.CER)
CertificateStore certStore = new CertificateStore();
certStore.AddCertificate(subCertificate);
certStore.AddCertificate(rootCertificate);
CertificateChain certChain = new CertificateChain(signingCertificate, certStore);
CertificateStatus status = testChain.VerifyChain(null, AuthType.Client);
if (status == CertificateStatus.ValidCertificate) ...
</code> |