gpt4 book ai didi

ssl - 经典 asp 中的 WinHttp TLS 连接

转载 作者:太空宇宙 更新时间:2023-11-03 14:56:06 25 4
gpt4 key购买 nike

我正在尝试将支付数据发送到 SagePay,由于他们正在关闭 SSL,因此需要使用 TLS 发送。

我的代码如下:

set httpRequest = Server.CreateObject("WinHttp.WinHttprequest.5.1")
httpRequest.Open "POST", CStr(strPurchaseURL), false
httpRequest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
httpRequest.send strPost
strResponse = httpRequest.responseText

有人告诉我,添加一个选项可以让您设置使用的协议(protocol),但我发现的唯一一个是:

httpRequest.option(9) = 2720

它允许 TLS 和 SSL,但它只能是 TLS,有没有人知道代码需要是什么,或者我应该做些什么。

最佳答案

选项 9WinHttpRequestOption_SecureProtocols这是

SSL 2.0: 0x0008
SSL 3.0: 0x0020
Transport Layer Security (TLS) 1.0: 0x0080

所以

httpRequest.option(9) = &H80

关于ssl - 经典 asp 中的 WinHttp TLS 连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29098446/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com