ssl - 无法通过使用 MSXML2.ServerXMLHTTP 的 SHA2 证书的 HTTPS 连接到服务器

标签 ssl asp-classic windows-server-2003 msxml serverxmlhttp

我们将 SSL 证书更新为 SHA2,但中间证书为 SHA1。 Chrome 和其他浏览器已经决定整个链必须是 SHA2。我们的客户打电话担心地址栏中的黄色警告。有传言称,几个月后 Chrome 和其他浏览器将用停止屏幕取代温和不显眼的警告。我们当然不希望那样!

...

因此我们重新颁发了证书,新证书由 SHA2 中间体签名。当我们使用该证书加密我们服务器上的流量时,我们使用 MSXML2.ServerXMLHTTP(在 Windows Server 2003 上运行)访问该服务器上的远程 Web 服务的应用程序将无法再连接。

经过研究,我们应用了这两个看起来可以解决问题的修补程序:

https://support.microsoft.com/kb/938397/en-us https://support.microsoft.com/kb/968730/en-us

但问题依然存在。将证书切换回 SHA2 和 SHA1 中间体,我们没有问题。

我们已经在受信任的存储中安装了中间 SHA2 证书,但问题仍然存在。

我们已尝试指定 MSXML2.ServerXMLHTTP 的所有版本,但都失败了。

ASP 代码:

function query(xml)

    dim xmlhttp, xmlDoc, url

    url = application("component_url")

    set xmlhttp = server.createobject("MSXML2.ServerXMLHttp")
    call xmlhttp.open ("POST", url, false)
    call xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")

    on error resume next
        err.clear   

        call xmlhttp.send(xml)

        if err.number <> 0 then
            call sendAlert("An error has occurred while trying to send your request", message)
        else
            dim rt
            rt = ConvertUtf8BytesToString(xmlhttp.responseBody)
            set xmlDoc = server.createobject("MSXML2.DomDocument")          
            xmlDoc.loadXml(rt)
        end if
    on error goto 0

    set query = xmlDoc
    set xmlHttp = nothing
    set xmlDoc = nothing
end function

最佳答案

你的情况很可能和这个一样post ,特别是您提到的脚本已经运行了 10 多年的最后一个答案。

完整引用最后一个答案:

I know it is an old question. This issue could be because of unsupported cipher suites. Try adding - TLS_RSA_WITH_AES_128_CBC_SHA AES128-SHA - TLS_RSA_WITH_AES_256_CBC_SHA AES256-SHA

That means you have to follow this kb: http://support.microsoft.com/kb/948963 This update is also interesting if you are still using windows 2003. Which will allow connecting to site using SHA2 - http://support.microsoft.com/kb/968730

Please note that Windows Server 2003 support is ending July 14, 2015

如果代码在 Windows Server 2003 上运行,我建议您在较新的机器上尝试它,也许是装有 Windows 7 的笔记本电脑以进行快速测试。

关于ssl - 无法通过使用 MSXML2.ServerXMLHTTP 的 SHA2 证书的 HTTPS 连接到服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28114300/

相关文章:

ssl - 将主题名称转换为 x509_name 格式

html - 禁用特定页面上的页面缓存

internet-explorer - Internet Explorer 中带有空格的内容处理附件文件名

javascript - 正则表达式匹配最后一个空格字符

postgresql - 如何在 Tableau Mac 版本上为 Heroku 的 postgres 连接启用 SSL?

iis - 通过 SSL 在 IE 上使用 CFContent

security - 您如何测试 SSL 客户端库是否正确验证了它所连接的服务器的证书?

修改 “Machine Keys” 文件夹权限后 SSL 损坏 - 错误 107 (net::ERR_SSL_PROTOCOL_ERROR):SSL 协议(protocol)错误

linux - 从 linux 到 windows 的远程命令

c++ - WinSock2.h 编译错误