EDN Admin
Well-known member
Hi,
I am trying to establish an HTTPS connection with a server. I am using winHTTP win32 APIs. I was initially using only HTTP and it was working great. To enable SSL support, I used
<span style="font-size:x-small WINHTTP_FLAG_SECURE in WinHttpOpenRequest API. Then I used crypto APIs to open "MY" certificate store, loaded a certificate present there and set it using WinHttpSetOption. Then when I send a request to the server by using WinHttpSendRequest,
it used to fail with error 0x80090325 saying the certificate authority is invalid. When I use IE and point my browser to the same URL, I get a certificate error. I tried to install the server certificate from IE but the error did not go when I refreshed the
page.
<span style="font-size:x-small At this point, I used WinHttpSetOption and set an option to ignore the following :
<span style="font-size:x-small SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_FLAG_IGNORE_CERT_CN_INVALID | SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE.
<span style="font-size:x-small <span style="font-size:x-small When I run now, I am getting an unknown error 0x80090327. Event viewer is not showing any useful info. How to overcome this error and connect to the server using HTTPS?
<span style="font-size:x-small <span style="font-size:x-small The Server manufacturer has said that they support HTTPS without client certificate validation. I did not understand what this means also. In the header I am adding "Authorization : Basic usernameassword"
where usernameassword is base64 encoded.
<span style="font-size:x-small Any help would be much appreciated.
<span style="font-size:x-small Thanks,
<span style="font-size:x-small Harinandan
<span style="color:#008000
<span style="color:#008000
View the full article
I am trying to establish an HTTPS connection with a server. I am using winHTTP win32 APIs. I was initially using only HTTP and it was working great. To enable SSL support, I used
<span style="font-size:x-small WINHTTP_FLAG_SECURE in WinHttpOpenRequest API. Then I used crypto APIs to open "MY" certificate store, loaded a certificate present there and set it using WinHttpSetOption. Then when I send a request to the server by using WinHttpSendRequest,
it used to fail with error 0x80090325 saying the certificate authority is invalid. When I use IE and point my browser to the same URL, I get a certificate error. I tried to install the server certificate from IE but the error did not go when I refreshed the
page.
<span style="font-size:x-small At this point, I used WinHttpSetOption and set an option to ignore the following :
<span style="font-size:x-small SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_FLAG_IGNORE_CERT_CN_INVALID | SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE.
<span style="font-size:x-small <span style="font-size:x-small When I run now, I am getting an unknown error 0x80090327. Event viewer is not showing any useful info. How to overcome this error and connect to the server using HTTPS?
<span style="font-size:x-small <span style="font-size:x-small The Server manufacturer has said that they support HTTPS without client certificate validation. I did not understand what this means also. In the header I am adding "Authorization : Basic usernameassword"
where usernameassword is base64 encoded.
<span style="font-size:x-small Any help would be much appreciated.
<span style="font-size:x-small Thanks,
<span style="font-size:x-small Harinandan
<span style="color:#008000
<span style="color:#008000
View the full article