Sage Pay today ended their exemption for sites to use SSL3 when communicating with their payment / authorisation servers. TLSv1 is now required.
We have a Windows Server 2003 box running IIS6, and two sites written (sadly) in Classic ASP. The box has been patched / registry keys updated to mitigate against POODLE, and various online checkers back this up. The server should be using TLS ONLY.
However, when trying to authorise a Sage Pay transaction using WinHttp.WinHttpRequest.5.1 and a POST, the attempt fails immediately. The only error fed back by WinHttpRequest is "-2147483638 - WinHttp.WinHttpRequest - The data necessary to complete this operation is not yet available."
Internet Explorer on the same server is also unable to access the Sage Pay adminstration interfaces hosted on the same URLs. This, despite SSLv2 and SSLv3 being turned off in Internet Options. Again, TLSv1 should be the only option available to ANYTHING on the box.
It doesn't matter what timeouts or options I put on the WinHttp object - it fails so quickly it's almost like it hasn't even tried.
I have verified that the server in question CAN communicate with Sage Pay's servers by using curl. curl works either without a protocol specified (it uses TLS) or by manually specifying - and won't when SSL2 or 3 is specified - as expected.
If that works, why won't anything else - when every bit of server configuration says it should?
Here is a small sample of code which returns the above quoted WinHttpRequest error:
<%
VSPServer = "https://test.sagepay.com/showpost/showpost.asp"
Set objHTTP = Server.CreateObject("WinHttp.WinHttprequest.5.1")
On Error Resume Next
objHTTP.Open "POST",CStr(VSPServer),False
objHTTP.Send "Hello"
If Err.Number <> 0 Then
Response.Write "Status: " & objHTTP.Status & "<p>"
Response.Write Err.Number & " - " & Err.Source & " - " & Err.Description
End If
On Error Goto 0
Set objHTTP = Nothing
%>
If False is changed to True (to run this async) in the objHTTP.Open line, the script returns nothing. This script worked prior to Sage Pay turning things off this afternoon.
objHTTP.option(9) = ?
according to the documentation on MSDN - "Sets an unsigned long integer value that specifies which secure protocols are acceptable. By default only SSL3 and TLS1 are enabled. Can by a combination of one or more of the following values." So if you are using TLSv1 you should be ok, but are you sure SagePay doesn't use TLSv1.1 or TLSv1.2? – Rexerwscript.exe
(removing the Classic ASP specific syntax and outputting usingMsgBox()
syntax) and I get a status of200
. No error, didn't even need theoption(9)
?? I'm running Windows 7 Professional x64 - Service Pack 1. – Rexer