Discussion:
https?
(too old to reply)
axis
2005-09-03 01:20:58 UTC
Permalink
Rght now i crack the url, then do InternetOpen
(INTERNET_OPEN_TYPE_PRECONFIG), InternetConnect (w/ host and port from
crackurl), HttpOpenRequest and finally HttpSendRequest (Get, the req
resource is "", and INTERNET_FLAG_RELOAD flag).Http hosts work fine, but for
https hosts, it waits for a long time on httpsendrequest and the nreturns a
connection reset error. What am I doing wrong?
Reymarx Gereda
2005-09-20 16:40:40 UTC
Permalink
Hi axis,

If you're using https, you need to make sure to use the port that the server is listening at for SSL communication. By default is 443 and you can pass INTERNET_DEFAULT_HTTPS_PORT to InternetConnect.

Also you need to pass the INTERNET_FLAG_SECURE flag to the dwFlags parameter of the HttpOpenRequest function.

According to the MSDN documentation:
INTERNET_FLAG_SECURE Uses secure transaction semantics. This translates to using Secure Sockets Layer/Private Communications Technology (SSL/PCT) and is only meaningful in HTTP requests.


I hope this help you
--
Reymarx [MSFT]
Windows- Networking
This posting is provided "AS IS" with no warranties, and confers no rights
Post by axis
Rght now i crack the url, then do InternetOpen
(INTERNET_OPEN_TYPE_PRECONFIG), InternetConnect (w/ host and port from
crackurl), HttpOpenRequest and finally HttpSendRequest (Get, the req
resource is "", and INTERNET_FLAG_RELOAD flag).Http hosts work fine, but for
https hosts, it waits for a long time on httpsendrequest and the nreturns a
connection reset error. What am I doing wrong?
Continue reading on narkive:
Loading...