IloveIniesta
IloveIniesta

Reputation: 350

How to Disable the Check for Server Certificate Revocation in windows phone 8

In my wp8 app,

  1. I enter a open wifi which is operated by communication operator
  2. blocked by a portal page that needs using account and password to log in
  3. after I post some data to a https url
  4. I have the ability to use the wifi network to access to internet freely.

Now,I encounter a problem:
before the https connection established successfully,it will be running the Online Certificate Status Protocol (OCSP)
OCSP needs to access to CA like veriSign to verify the server certificate status

but I have no internet access at this moment.

So,my app return a Webexception whose description is "The remote server returned an error: NotFound".I think it is because of the failure of OCSP.
Based on above,I want to find a solution to sovle this:

  1. My point is to disable the OCSP mechanism,Do you know how to do this?
  2. And I also would like to know if there is another solution to sovle the problem.

Hope your advice,Thanks!

Upvotes: 0

Views: 1894

Answers (1)

Peter Ritchie
Peter Ritchie

Reputation: 35870

The way you'd do that on .NET is to set the ServicePointManager.ServerCertificateValidationCallback delegate and perform the logic you want to perform. But, unfortunately that is not yet available on Windows Phone.

There are various uservoice suggestions related to this, for example:

They don't apply to you directly, but if they end up gaining access to ServicePointManager then you'll be able to do what you want to do.

Upvotes: 1

Related Questions