by Rick Weight [rick_weight at hotmail dot com] posted on 2005/09/22 |
|
I'm trying to pull the chain from a remote certificate. The problem is if a certificate in the chain is invalid, all I get is the end cert. Any ideas?
code sample
SecurityOptions sslOptions = new SecurityOptions(SecureProtocol.Ssl3 | SecureProtocol.Tls1);
sslOptions.AllowedAlgorithms = SslAlgorithms.SECURE_CIPHERS;
sslOptions.Entity = ConnectionEnd.Client;
sslOptions.VerificationType = CredentialVerification.None;
sslOptions.Flags = SecurityFlags.Default;
sslOptions.CommonName = t_sScanIP;
Org.Mentalis.Security.Certificates.CertificateChain chain = new Org.Mentalis.Security.Certificates.CertificateChain(sslConnection.RemoteCertificate);
Org.Mentalis.Security.Certificates.Certificate[] certs = chain.GetCertificates();
|