使用JVM标志
-Djavax.net.debug=ssl
Run Code Online (Sandbox Code Playgroud)
正在产生巨大的日志记录,服务器上每个SSL事件的详细信息.反正只有它有日志错误吗?或者可能有一些更好的这些标志子集产生更整洁的输出
all turn on all debugging
ssl turn on ssl debugging
The following can be used with ssl:
record enable per-record tracing
handshake print each handshake message
keygen print key generation data
session print session activity
defaultctx print default SSL initialization
sslctx print SSLContext tracing
sessioncache print session cache tracing
keymanager print key manager tracing
trustmanager print trust manager tracing
pluggability print pluggability tracing
handshake debugging can be widened with:
data hex dump of each handshake message
verbose …Run Code Online (Sandbox Code Playgroud) 注意:这不是使用代理的openssl s_client的副本,因为我对代理身份验证特别感兴趣,而不是使用代理的能力。
我正在使用openssl s_client检查目标服务器的证书以了解连接的工作方式/位置。由于我在公司代理后面,我可以指定带有-proxy标志的代理服务器,但是我需要将身份验证详细信息(用户名/密码)传递给这个代理 - 我还没有想出如何做到这一点。
openssl s_client -proxy my.proxy.server:8080 -connect my.target.host
Run Code Online (Sandbox Code Playgroud)
成功连接到代理服务器,但是,可以理解,会导致错误s_client: HTTP CONNECT failed: 407 Unauthorized。
以user:pass@my.proxy.server或http://user:pass@my.proxy.server两者的形式传递代理服务器会导致错误s_client: -proxy argument malformed or ambiguous。
如何将代理身份验证传递给 s_client?我很难相信它支持代理但不支持经过身份验证的代理。
我正在使用 openssl 版本 1.1.1a。