News  [SoftwareSite

Latest News
Older News
RSS Feed
 
Complete Projects
Useful Classes
Top Downloads
Message Board
AllAPI.net
 
Send Comments
Software License
Mentalis.org Buttons
Donate
 
Forums -> Security Library Forum
 
VerifyChain  
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>

 

Copyright © 2002-2007, The Mentalis.org Team. All rights reserved.
This site is located at http://www.mentalis.org/
Send comments to the webmaster.