Greetings,
I want use WinHttpRequest to access a OpenShift API server, it use a self signed certificate.
Does now work...
I never try with a self signed certificate, how do this?
Best regards
Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET", "https://openshift.domain:1234/api/", False)
$oHttp.Option(4) = 0x0100 + 0x0200 + 0x1000 + 0x2000
$oHTTP.Option(9) = 0x0080 ;WinHttpRequestOption_SecureProtocols
;~ $oHttp.SetClientCertificate("LOCAL_MACHINE\\Personal\\certificado.crt")
$oHttp.Send()
$oHttp.WaitForResponse()
Local $oAllHeaders = $oHttp.GetAllResponseHeaders()
$oReceived = $oHttp.ResponseText
$oStatusCode = $oHttp.Status
$oHttp = 0
If $oStatusCode = 200 Then
ConsoleWrite("$oAllHeaders--------------------" & @LF & $oAllHeaders & "$oAllHeaders--------------------" & @LF)
Else
ConsoleWrite("< error = " & $oReceived & @LF & $oAllHeaders & @LF)
EndIf