Discussion:
Inet Control & POST & internet_flag_ignore_cert_cn_invalid etc
(too old to reply)
hushtech
2006-11-09 23:36:02 UTC
Permalink
Can anyone tell me how to use the internet_flag_ignore_cert_cn_invalid
flag etc when POSTing using Internet Transfer Control as follows:

url = "https://somesite.com"
args = "?mode=auto&account=" + acct + "&password=" + pw
strHeader = "Content-type: application/x-www-form-urlencoded" & vbCrLf
InetGateway.Execute url, "POST", args, strHeader

I need to ignore an expired Certificate, or if possible -- how do I handle
the Certificate? Currently (since I don't deal with the Certificate ) the
request fails.

thanks -- jack
Vladimir Scherbina
2006-11-10 09:00:56 UTC
Permalink
hushtech,

I have no expirience in working with Internet Transfer Control. But in
wininet world if you need supress the ERROR_INTERNET_INVALID_CA error you
basically call InternetSetOption without SECURITY_FLAG_IGNORE_UNKNOWN_CA
flag. Following article shows how to do that:

http://support.microsoft.com/?id=182888

However, InternetSetOption needs a request handle. Can you obtain it from
control?
--
Vladimir (Windows SDK MVP)
Post by hushtech
Can anyone tell me how to use the internet_flag_ignore_cert_cn_invalid
url = "https://somesite.com"
args = "?mode=auto&account=" + acct + "&password=" + pw
strHeader = "Content-type: application/x-www-form-urlencoded" & vbCrLf
InetGateway.Execute url, "POST", args, strHeader
I need to ignore an expired Certificate, or if possible -- how do I handle
the Certificate? Currently (since I don't deal with the Certificate ) the
request fails.
thanks -- jack
hushtech
2006-11-10 16:56:02 UTC
Permalink
Thanks Vladimir, I have used wininet in other cases and have used options to
set
flags to tailor internet access. I'm unfortunately bound to use the
Control, but I
thought since I believe it uses the same dll, there must be a way to use the
flags
from the control, hence my question. My dilemma is that I'm using VB with
lots
of separate threads active, and I'm not knowledgeable about how to use
wininet
asynchronously in that environment; otherwise, I believe that's an easy
solution,
but it requires (I think) a fair amount of effort to implement -- if
possible. I'll
continue to look for the method of setting the flags with the internet
transfer control
a bit longer. I feel certain that it can be done, but I haven't found any
documentation or method yet.

thanks -- jack
Post by Vladimir Scherbina
hushtech,
I have no expirience in working with Internet Transfer Control. But in
wininet world if you need supress the ERROR_INTERNET_INVALID_CA error you
basically call InternetSetOption without SECURITY_FLAG_IGNORE_UNKNOWN_CA
http://support.microsoft.com/?id=182888
However, InternetSetOption needs a request handle. Can you obtain it from
control?
--
Vladimir (Windows SDK MVP)
Post by hushtech
Can anyone tell me how to use the internet_flag_ignore_cert_cn_invalid
url = "https://somesite.com"
args = "?mode=auto&account=" + acct + "&password=" + pw
strHeader = "Content-type: application/x-www-form-urlencoded" & vbCrLf
InetGateway.Execute url, "POST", args, strHeader
I need to ignore an expired Certificate, or if possible -- how do I handle
the Certificate? Currently (since I don't deal with the Certificate ) the
request fails.
thanks -- jack
Loading...