Bar*_*dan 7 authentication coldfusion certificate certificate-authority cfhttp
我目前正在使用支付处理器.我可以从我们的服务器浏览到支付URL,因此它不是防火墙问题,但是当我尝试使用CFHTTP时,我得到了一个I/O异常:peer未经过身份验证.我已经下载并安装了他们最新的安全证书到cacerts密钥库并重新启动了CF,但仍然遇到同样的错误.我不仅安装了提供者证书,还安装了证书链中的其他2个Verisign证书颁发机构证书.该证书是较新的Class 3扩展验证证书之一.
有没有人遇到这个并找到了解决方案?
在连接到第三方时遇到同样的问题后,我的一位同事发现了以下情况.
http://www.coldfusionjedi.com/index.cfm/2011/1/12/Diagnosing-a-CFHTTP-issue--peer-not-authenticated
https://www.raymondcamden.com/2011/01/12/Diagnosing-a-CFHTTP-issue-peer-not-authenticated/
我们在页面的下方使用了Pete Freitag评论中提供的解决方案.它可以工作,但我认为应该谨慎使用,因为它涉及动态删除和添加回JsafeJCE提供程序的特定属性.
为了存档,以下是Pete Freitag评论的原始内容:
我已经进一步缩小了这一点,并从RSA JsafeJCE提供程序中删除KeyAgreement.DiffieHellman(这导致使用默认的sun实现)接缝工作,并且可能对服务器的影响小于删除整个提供者会.这是你如何做到的:
Run Code Online (Sandbox Code Playgroud)<cfset objSecurity = createObject("java", "java.security.Security") /> <cfset storeProvider = objSecurity.getProvider("JsafeJCE") /> <cfset dhKeyAgreement = storeProvider.getProperty("KeyAgreement.DiffieHellman")> <!--- dhKeyAgreement=com.rsa.jsafe.provider.JSA_DHKeyAgree ---> <cfset storeProvider.remove("KeyAgreement.DiffieHellman")> Do your http call, but pack the key agreement if you want: <cfset storeProvider.put("KeyAgreement.DiffieHellman", dhKeyAgreement)>
我通过使用SSLSocketFactory创建一个https连接来解决这个问题,这个连接在堆栈跟踪中提供了比使用cfhttp时更多的细节:
Run Code Online (Sandbox Code Playgroud)yadayadayada Caused by: java.security.InvalidKeyException: Cannot build a secret key of algorithm TlsPremasterSecret at com.rsa.jsafe.provider.JS_KeyAgree.engineGenerateSecret(Unknown Source) at javax.crypto.KeyAgreement.generateSecret(DashoA13*..) at com.sun.net.ssl.internal.ssl.DHCrypt.getAgreedSecret(DHCrypt.java:166)
如果从ColdFusion抛出的异常稍微不那么通用,那将会很棒.
归档时间: |
|
查看次数: |
18949 次 |
最近记录: |