Skip to content

Commit 6f4e407

Browse files
committed
Added: Allowing all available secure protocols for _WinHttpSimple... functions.
1 parent 0f14ca2 commit 6f4e407

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

WinHttp.au3

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,6 +1769,7 @@ EndFunc
17691769
; |2 - could not send request
17701770
; |3 - could not receive response
17711771
; Author ........: ProgAndy
1772+
; Modified.......: trancexx
17721773
; Related .......: _WinHttpSimpleSSLRequest, _WinHttpSimpleSendRequest, _WinHttpSimpleReadData
17731774
; ===============================================================================================================================
17741775
Func _WinHttpSimpleSendSSLRequest($hConnect, $sType = Default, $sPath = Default, $sReferer = Default, $sDta = Default, $sHeader = Default, $iIgnoreAllCertErrors = 0)
@@ -1784,6 +1785,7 @@ Func _WinHttpSimpleSendSSLRequest($hConnect, $sType = Default, $sPath = Default,
17841785
If $sType = "POST" And $sHeader = $WINHTTP_NO_ADDITIONAL_HEADERS Then $sHeader = "Content-Type: application/x-www-form-urlencoded" & @CRLF
17851786
_WinHttpSetOption($hRequest, $WINHTTP_OPTION_DECOMPRESSION, $WINHTTP_DECOMPRESSION_FLAG_ALL)
17861787
_WinHttpSetOption($hRequest, $WINHTTP_OPTION_UNSAFE_HEADER_PARSING, 1)
1788+
_WinHttpSetOption(_WinHttpQueryOption(_WinHttpQueryOption($hRequest, $WINHTTP_OPTION_PARENT_HANDLE), $WINHTTP_OPTION_PARENT_HANDLE), $WINHTTP_OPTION_SECURE_PROTOCOLS, BitOR($WINHTTP_FLAG_SECURE_PROTOCOL_ALL, $WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1, $WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2))
17871789
_WinHttpSendRequest($hRequest, $sHeader, $sDta)
17881790
If @error Then Return SetError(2, 0 * _WinHttpCloseHandle($hRequest), 0)
17891791
_WinHttpReceiveResponse($hRequest)

0 commit comments

Comments
 (0)