[Mono-dev] Getting Server Certificate with HttpWebRequest?

Valon Cross vcross at thornburgmortgage.com
Sun Aug 26 22:04:47 EDT 2007

Hi, if this question is better posted to a list, please let me know:  


I want to query a server's SSL Certificate so I can test the "Not After"
value and see when the cert is about to expire.  


I tried the following technique (with my employer's URL) and can get the
HTML  back.  But I need to trap the SSL handshake conversation before
the HTML is returned:  


sURL = "https://thornburgmortgage.loanadministration.com/";

                this.webRequest =


                // BuildReqStream(ref webrequest);

                HttpWebResponse webresponse;

                webresponse =


                Encoding enc = System.Text.Encoding.GetEncoding(1252);

                StreamReader loResponseStream = new 



                string Response = loResponseStream.ReadToEnd();




                System.Console.WriteLine("Response Stream: " +


Do you know how to get the SSL information?  Is there something like
java's httpCommons for .NET 2005?




Valon Cross

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070826/370369af/attachment.html 

More information about the Mono-devel-list mailing list