botanic Posted December 2, 2013 Share Posted December 2, 2013 (edited) I have been working on this for awile and I can get https to work with valid certs but not unsigned ones. Here is my current code, I tried to set Option('WinHttpRequestOption_SslErrorIgnoreFlags' = 0x3300) but it didnt seem to do anything... $file = FileOpen($configfile) $data = FileRead($file) HttpPost("https://" & $systemsettings[_ArraySearch($systemsettings, 'remoteserver')][1] & "/post.php", $data) Func HttpPost($sURL, $sData = "") Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("POST", $sURL, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.Option('WinHttpRequestOption_SslErrorIgnoreFlags' = 0x3300) $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($sData) If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc ;==>HttpPost here is the error im getting C:developmentlib.au3 (92) : ==> The requested action with this object has failed.: $oHTTP.Send($sData) $oHTTP.Send($sData)^ ERROR ->02:27:30 AutoIt3.exe ended.rc:1 >Exit code: 1 Time: 0.709 Edited December 2, 2013 by botanic Link to comment Share on other sites More sharing options...
l3ill Posted December 2, 2013 Share Posted December 2, 2013 Hi botanic, I know nothing about HTTPS but I do remember seeing >this post on HTTP by Trancexx while looking for something else. Maybe it will help. Bill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
botanic Posted December 2, 2013 Author Share Posted December 2, 2013 Its specifically an issue with self-signed certs, http works as well as https to a non-self-signed url I have found a few things but nothing that helped Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now