【问题标题】:CURL certificate validation vs openssl s_client?CURL 证书验证与 openssl s_client?
【发布时间】:2021-04-22 17:02:27
【问题描述】:

我遇到了一个问题,通过 curl 连接到 https://server 失败:

curl: (60) 服务器证书验证失败。

但使用 openssl s_client 启动连接工作正常。

问题在某种程度上与服务器端有关,但我不明白是什么导致 curl 在 openssl s_client 正常时拒绝连接。 OpenSSL 1.0.2s-fips

帮助?

【问题讨论】:

  • openssl s_client 至少在 1.0.2 中不会检查服务器名称是否与证书匹配,而 curl 会。 openssl s_client 即使验证失败也会继续,即它可能看起来 "openssl s_client was ok" 即使不是。
  • 谢谢,openssl 确实对每个中级证书说 verify=1。问题是......实际的服务器证书已过期。 Openssl最终检查(会话开始)也说“验证返回码:0(ok)”所以它是实际的证书,而不是“链”。

标签: ssl certificate pki


【解决方案1】:

无赖。过期的不是链,而是实际的证书。 不知何故 openssl s_client 没有抓住这一点。我也没有。 (openssl s_client -showcerts 确实显示链证书但不显示服务器证书)

【讨论】:

    猜你喜欢
    • 2019-12-27
    • 2021-07-31
    • 2018-11-29
    • 1970-01-01
    • 1970-01-01
    • 2015-05-20
    • 2018-08-21
    • 1970-01-01
    • 2018-11-21
    相关资源
    最近更新 更多