gpt4 book ai didi

soap - Coldfusion CFHTTP 握手失败

转载 作者:行者123 更新时间:2023-12-02 10:36:14 26 4
gpt4 key购买 nike

我正在尝试通过 CFHTTP 发送带有客户端证书的 SOAP 请求。我在 SOAP UI 中的测试请求成功,但是当我尝试通过 CFHTTP 发送请求时,出现以下错误:

I/O Exception: Received fatal alert: handshake_failure

我的CFHTTP标签是这样的:

<cfhttp
url="https://..."
method="post"
clientcert="C:\..."
clientcertpassword="password"
result="httpResponse"
>

我尝试检查日志以获取有关故障发生位置的更多信息。我只能得到以下内容:

http.log

"Information","ajp-bio-8014-exec-10","09/26/16","07:07:59",,"Starting HTTP request {URL='https://...', method='post'}"

coldfusion-out.log

Sep 26, 2016 07:07:59 AM Information [ajp-bio-8014-exec-10] - Starting HTTP request {URL='https://...', method='post'}

我已经使用 keytool 导入了证书,当我在 cacerts 中列出证书时,我会在那里看到它们。

还有其他想法可以解决此问题吗?

编辑添加:

我的证书采用 .p12 格式并有密码。我已经在 SOAP UI 中使用密码测试了 .p12 文件,它可以工作。

我已经安装了 CF10-Certman 并确认 CF 管理员也提供了证书。

我已将这些行添加到我的 jvm.config 中:

-Djavax.net.ssl.keyStore=C:\\ColdFusion11\\jre\\lib\\security\\cacerts 
-Djavax.net.ssl.keyStorePassword=password
-Djavax.net.ssl=debug
-Djavax.net.debug=all

我尝试了使用\和/的 keystore 路径(“C:/Coldfusion11/...”)

额外的 Coldfusion-out.log 输出:

Sep 26, 2016 11:10:06 AM Information [ajp-bio-8014-exec-2] - Starting HTTP request {URL='https://...', method='post'}
...
Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
...
Allow unsafe renegotiation: true
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
%% No cached client session
*** ClientHello, TLSv1
RandomCookie: GMT: 1458128991 bytes = { 40, ... }
Session ID: {}
Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_RC4_128_SHA, TLS_ECDH_ECDSA_WITH_RC4_128_SHA, TLS_ECDH_RSA_WITH_RC4_128_SHA, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_RC4_128_MD5, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
Compression Methods: { 0 }
Extension elliptic_curves, curve names: {secp256r1, sect163k1, sect163r2, secp192r1, secp224r1, sect233k1, sect233r1, sect283k1, sect283r1, secp384r1, sect409k1, sect409r1, secp521r1, sect571k1, sect571r1, secp160k1, secp160r1, secp160r2, sect163r1, secp192k1, sect193r1, sect193r2, secp224k1, sect239k1, secp256k1}
Extension ec_point_formats, formats: [uncompressed]
Extension server_name, server_name: [host_name: url ]
***
ajp-bio-8014-exec-2, WRITE: TLSv1 Handshake, length = 195
ajp-bio-8014-exec-2, READ: TLSv1.1 Alert, length = 2
ajp-bio-8014-exec-2, RECV TLSv1 ALERT: fatal, handshake_failure
ajp-bio-8014-exec-2, called closeSocket()
ajp-bio-8014-exec-2, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
Finalizer, called close()
Finalizer, called closeInternal(true)

SOAPUI 中的 CipherSuite 为 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA

更新

我从 cfhttp 标签中删除了 clientcert 和 clientcertpassword,现在我在 Coldfusion-out.log 中看到了这一点:

ajp-bio-8014-exec-1, WRITE: TLSv1.1 Handshake, length = 64
ajp-bio-8014-exec-1, setSoTimeout(360000) called
ajp-bio-8014-exec-1, WRITE: TLSv1.1 Application Data, length = 1680
ajp-bio-8014-exec-1, READ: TLSv1.1 Alert, length = 48
ajp-bio-8014-exec-1, RECV TLSv1.1 ALERT: warning, close_notify
ajp-bio-8014-exec-1, called closeInternal(false)
ajp-bio-8014-exec-1, SEND TLSv1.1 ALERT: warning, description = close_notify
ajp-bio-8014-exec-1, WRITE: TLSv1.1 Alert, length = 48
ajp-bio-8014-exec-1, called closeSocket(false)
ajp-bio-8014-exec-1, called close()
ajp-bio-8014-exec-1, called closeInternal(true)

我已联系服务器管理员,看看他们是否看到了该请求。

更新

重新添加客户端证书即可修复此问题!

最佳答案

我不确定到底是什么解决了这个问题,但如果您查看我的原始帖子(包括更新),以下内容似乎有所贡献:

1) 不包括 clientcert 导致 ColdFusion 检查服务器证书的 cacerts

2) 重新添加clientcert导致ColdFusion完成握手

JVM.config 设置还有助于调试并确保使用正确的协议(protocol)。

关于soap - Coldfusion CFHTTP 握手失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39702469/

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