Hello,
the "Unable to perform revocation check of the server certificate" error is thrown in case where it is not possible to check whether the certificate is revoked or not. Such a check includes connecting to the CRL server, downloading the revocation list and checking that certificate is not revoked.
Would it be possible to try running the following code from a simple console application to determine whether this is an issue in Rebex code or whether the same result can be reproduced using .NET objects only?
using System;
using Rebex.Net;
using Rebex.Security.Certificates
using System.Security.Cryptography.X509Certificates;
// 1. Use Rebex FTP to download the server certificate chain into a series of files
var client = new Ftp();
client.Settings.SslAcceptAllCertificates = true;
client.Connect("test.rebex.net", SslMode.Implicit);
for (int n = 0; n < client.TlsSocket.ServerCertificate.Count; n++)
{
client.TlsSocket.ServerCertificate[n].Save("cert" + n + ".der", CertificateFormat.Base64Der);
}
// 2. Validate the certificate chain (from the saved files) without using any Rebex code
X509Certificate2 cert = new X509Certificate2("cert0.der");
X509ChainPolicy policy = new X509ChainPolicy();
policy.RevocationFlag = X509RevocationFlag.ExcludeRoot;
policy.RevocationMode = X509RevocationMode.Online;
for (int n = 0; File.Exists("cert" + n + ".der"); n++)
{
X509Certificate2 cert2 = new X509Certificate2("cert" + n + ".der");
policy.ExtraStore.Add(cert2);
}
Console.WriteLine("Loaded chain with {0} certificates.", policy.ExtraStore.Count + 1);
X509Chain chain = new X509Chain(false);
try
{
chain.ChainPolicy = policy;
bool valid = chain.Build(cert);
Console.WriteLine("Is valid: {0}", valid);
foreach (X509ChainStatus s in chain.ChainStatus)
{
X509ChainStatusFlags flags = s.Status;
Console.WriteLine("Status: {0}", flags);
}
}
finally
{
chain.Reset();
}
What results does it show?