Re: Examining server certificates using HttpWebRequest/HttpWebResponse

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Adarsh Khare [ MS ] (adarshk_at_microsoft.com)
Date: 07/14/04


Date: Wed, 14 Jul 2004 16:00:04 -0700


Currently there is no straight forward way in HttpWebResponse.

But there is a workaround to examine server certificate, you need to
implement your ICertificatePolicy interface and set the
ServicePointManager.CertifcatePolicy, your check validation method would be
invoked with the request and corresponding X509Certificate.

adarshk

 ===========================

 This posting is provided as-is. It provides no guarantees and confers no
rights

"Nebraska" <Nebraska@discussions.microsoft.com> wrote in message
news:7569BEFD-BAB8-4242-8821-8909CB8A1E8F@microsoft.com...
> I see that it is possible to examine client certificates using
HttpWebRequest class. Is there any way to see server side certificates in a
similar manner - assuming a successfully authenticated HTTPS
request/response? I notice there is no certificate collection in the
HttpWebResponse class.



Relevant Pages

  • Re: Examining server certificates using HttpWebRequest/HttpWebResp
    ... I have tried what you suggest and am able to inspect the server certificate. ... Can I defer the validation to another class to get that default validation behavior after looking at the certificate? ... > HttpWebRequest class. ...
    (microsoft.public.dotnet.framework)
  • Re: ASP.NET / certificat
    ... a result of it being installed in the user's certificate store. ... > Simplified function code looks like this: ... > HttpWebResponse httpWebResponse = ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Using pfx certificate to authenticate a webrequest
    ... Ive got the provided certificate installed in IE, ... the website page, it shows a window to select the client certificate ... HttpWebResponse result = req.GetResponse; ... System.Net.Connection.ReadCallback(IAsyncResult asyncResult) --- End ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • How to use https and certificates from asp.Net (C#)
    ... Should I install the certificate in the certificate store ... HttpWebResponse httpWebResponse = ... StreamReader responseData = new StreamReader ...
    (microsoft.public.security)
  • Re: Windows Mobile + https + clientcertificates?
    ... You can also make use of SSL through lower level interfaces ... the server certificate on the test server is ... the client certificate, and the server certificate error handling options, ...
    (microsoft.public.windowsce.app.development)