12-08-2009 06:12 AM
I have following issue:
I'm connecting to https url and I have 2 cases:
1) when I connect to server with trusted certificate (i.e https://www.google.com ) I get proper response
2) when I connect to server with untrusted certificate I get "You are attempting to open a secure connection, but the server's certificate is not trusted" message . I would rather get Exception, and handle it, so question is: Is there opportunity to force HttpsConnection to throw exception instead showing popup?
12-08-2009 08:54 AM
I'm not aware of a way to achieve this programmatically. However, I believe you can require only verified chains of trust using the settings under Options -> Security Options -> TLS or using the IT Policy.
12-08-2009 09:06 AM
Thanks for your reply.
But I have a different problem. I can connect using the https url, but in case of untrusted destination server I get popup in my app asking user: "You are attempting to open a secure connection, but the server's certificate is not trusted : Continue/Close connection/ View certification/ Trust certificate ". I want to deny user to use an untrusted servers, so I would like to turn off the popup that asks user. User should only use the trusted https url and nothing else.
12-08-2009 09:29 AM
As I mentioned earlier, you can tell the OS (albeit not programmatically, as far as I know) to deny TLS/SSL connections where the chain of trust of the server certificate cannot be verified.
02-19-2010 09:05 AM
Did you ever resolve this? We don't care so much about users seeing the popup warning, but we do want to be able to check to see whether the certificate is signed by a trusted CA. If it is not, we need to be able to exit gracefully.