4

I am trying to use a self-signed certificate in a ssl socket on windows8 consumer preview. I am getting this exception:

Exception : System.Runtime.InteropServices.COMException (0x800B0109): A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. (Exception from HRESULT: 0x800B0109 .

Is it possible to override the validation of ssl certificate ? Something like remotecertificatevalidationcallback , which does not seem to be accessible on windows8.

Thanks a lot in advance.

Erik Philips
  • 53,428
  • 11
  • 128
  • 150
pkumar0
  • 2,069
  • 3
  • 14
  • 21
  • Add yourself to the trusted CA list. http://windows.microsoft.com/en-US/windows-vista/View-or-manage-your-certificates – Ritch Melton Apr 03 '12 at 01:48
  • I do not want to add manually. I would like to programmatically override it because the client and the server trust each other and just want to encrypt the data with server's public key. – pkumar0 Apr 03 '12 at 05:13

1 Answers1

0

In Silverlight (which has a very similar security model), there is no way to go around a SSL error in a connection. The only workaround in my case was a server side proxy hiding the SSL errors.

I doubt that you'll find a way to do insecure connections in Win8's sandbox (same as in Silverlight).

jv42
  • 8,521
  • 5
  • 40
  • 64
  • We were able to get SSL to work with a real geotrust certificate. One good thing to note was that if you get a certificate for "foo.com" but your server's DNS does not end in "foo.com", you will have to Use the UpgradeToSslAsync – pkumar0 Jun 26 '12 at 23:42
  • await aTcpClient.ConnectAsync( new Windows.Networking.HostName(Params.RemoteHost), "443", SocketProtectionLevel.PlainSocket ); // SEnd/Receive if you need to before starting ssl await aTcpClient.UpgradeToSslAsync(SocketProtectionLevel.Ssl, new Windows.Networking.HostName("x.foo.com")); – pkumar0 Jun 26 '12 at 23:46