On Mar 27, 4:06 pm, "Henning Krause [MVP - Exchange]"
<newsgroups_rem...@this.infinitec.de> wrote:
> I would guess that the SslStream is checking the revocation status of the
> remote certificate.
That is what I thought too. This is what I am doing currently:
TcpClient client = new TcpClient("127.0.0.1", 50051);
SslStream ssl = new SslStream(client.GetStream(), false, new
RemoteCertificateValidationCallback(ValidateServerCertificate), null);
ssl.AuthenticateAsClient("", null,
System.Security.Authentication.SslProtocols.Ssl3, false);
My ValidateServerCertificate does simply: return true;
So it really should not be checking the revocation list... (I guess
that it is possible that it is the SSL server doing the check...)
Thanks for your help
davidkclark - 28 Mar 2007 00:22 GMT
In fact, now that I check the docs again, the default (when you just
pass it the hostname string) is for it not to check the revocation
list:
http://msdn2.microsoft.com/en-us/library/ms145060.aspx
Eugene V. Bobukh [MS] - 29 Mar 2007 01:23 GMT
If my memory serves me right, the behavior might be expected.
First, validation of the certificate may require the download of certificates of the parent authorities.
Second, as it was correctly mentioned, validating the cert includes checking its revocation list. And I would really *not* recommend to drop this check, since without it you still will be able to connect say to a phishing site after its certificate was revoked by the issuing authority.
It's a question though why the verification takes that long. Although the delays like that might be rarely expected, those should not be common. I would suspect there is something wrong either with the network, or with the cert you provide, but honestly have no really deep thoughts on that.
Thanks,
Eugene V. Bobukh
> On Mar 27, 4:06 pm, "Henning Krause [MVP - Exchange]"
> <newsgroups_rem...@this.infinitec.de> wrote:
[quoted text clipped - 15 lines]
>
> Thanks for your help
davidkclark - 29 Mar 2007 15:53 GMT
Thanks for your thoughts Eugene,
I understand where you are coming from with your suggestions about not
dropping the revocation check. However, as the machines involved are
not actually connected to the internet there is no possible way at all
for these requests to succeed. The system uses a self signed
certificate (certified by a self signed root certificate) entirely on
the local network only. I know this is perhaps not the recommended
setup, but surely it should be possible to make an SSL connection
between two machines not connect to the internet. I have told it not
to check the revocation list, I do not do anything with the
certificate in either of the two available callbacks.
I do not read anywhere in the SslSteam (etc.) docs that for the
connection to work the machines have to have an open route to the
internet via port 80. Indeed, the request does not fail - it just
takes 15 seconds some times. I see three SYN packets try to get out on
port 80 each time there is the 15 seconds delay. Each of these SYN
packets happen at an interval of about 5 seconds. 5 * 3 = 15.
Thanks.