Page 1 of 1

PB6.20B4 - Windows - How to use self signed cert with HTTPRequest?

Posted: Fri Jan 31, 2025 3:05 pm
by Kukulkan
Hi,

I try to open a local domain where i run a self signed https page.

Code: Select all

Protected httpRequest = HTTPRequest(#PB_HTTP_Get, url.s)
If httpRequest
  Debug HTTPInfo(HTTPRequest, #PB_HTTP_Response)
  If HTTPInfo(HTTPRequest, #PB_HTTP_StatusCode) = "200" And HTTPInfo(HTTPRequest, #PB_HTTP_Response) = "OK"
    FinishHTTP(HTTPRequest)
    ProcedureReturn #True
  EndIf
  Debug "ERROR: " + HTTPInfo(HTTPRequest, #PB_HTTP_ErrorMessage) + " [" + HTTPInfo(HTTPRequest, #PB_HTTP_StatusCode) + "]"
  FinishHTTP(HTTPRequest)
Else
  Debug "ERROR: Request creation failed"
EndIf
Sadly, I get the following Error:

Code: Select all

ERROR: schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate. [0]
On this machine I installed my root CA in Firefox and it works fine. The same for Chrome.
I also installed my root CA in Windows certificates stores (all users and current user, import as root CA).

It is loading fine in Edge, Chrome and Firefox.
Using curl I have to provide the -k parameter as it seems to ignore all my imported root CA.
PureBasic HTTPRequest triggers the above error.

Is there a way to make HTTPRequest accept my cert?

The same Question for the new WebView gadget...

Re: PB6.20B4 - Windows - How to use self signed cert with HTTPRequest?

Posted: Fri Jan 31, 2025 6:30 pm
by Paul
Did you look at the optional flags for HTTPRequest() command?

Re: PB6.20B4 - Windows - How to use self signed cert with HTTPRequest?

Posted: Mon Feb 03, 2025 8:17 am
by Kukulkan
Paul wrote: Fri Jan 31, 2025 6:30 pm Did you look at the optional flags for HTTPRequest() command?
Oh, shit :shock: I really missed that... Thanks!
The same Question for the new WebView gadget...
And for the WebView? I just checked the documentation here, too. But can't find something related?