【问题标题】:openssl / libressl ocsp responder missing response for expired/revoked certificatesopenssl / libressl ocsp 响应者缺少对过期/吊销证书的响应
【发布时间】:2018-09-27 12:54:26
【问题描述】:

出于某种原因,OpenSSL OCSP 响应程序似乎没有为过期或撤销的证书提供任何响应。对于有效的证书,一切都很好。

在 LibreSSL 2.2.7(在 MacOS 上)上对此进行了测试。作为参考,我还在非常旧的 OpenSSL 0.9.8f 上进行了测试,同样的问题。

设置

文件 index.txt(字段以制表符分隔):

V   20991231235959Z     32F31   unknown /CN=valid01
V   20991231235959Z     32F32   unknown /CN=valid02
V   20991231235959Z     32F33   unknown /CN=valid03
E   20171231235959Z     32F34   unknown /CN=expired01
E   20171231235959Z     32F35   unknown /CN=expired02
E   20171231235959Z     32F36   unknown /CN=expired03
R   20171231235959Z 20160631235959Z 32F37   unknown /CN=revoked01
R   20171231235959Z 20160631235959Z 32F38   unknown /CN=revoked02
R   20171231235959Z 20160631235959Z 32F39   unknown /CN=revoked03
V   20991231235959Z     32F3A   unknown /CN=valid04

文件索引.txt.attr:

unique_subject = yes

文件 ca.pem:

(Please create your own, self-signed ca with key)

使用启动 OCSP 响应程序

openssl ocsp -index index.txt -port 8084 -rkey ca.pem -rsigner ca.pem -CA ca.pem -text -resp_no_certs

测试

查询有效证书(这里没问题):

$ openssl ocsp -issuer ca.pem -serial 0x32f31 -url http://localhost:8084 -noverify
0x32f31: good
    This Update: Sep 27 12:46:06 2018 GMT

查询过期或撤销证书(缺少响应):

$ openssl ocsp -issuer ca.pem -serial 0x32f36 -url http://localhost:8084 -noverify
0x32f36: ERROR: No Status found.

出了什么问题?

【问题讨论】:

    标签: openssl ocsp libressl


    【解决方案1】:

    发现问题。 OpenSSL 似乎要求索引文件中的时间戳采用两位数的年份形式,而不是四位数。 2000 年的问题有人吗?显然不是。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-26
      • 2012-03-25
      • 1970-01-01
      • 1970-01-01
      • 2016-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多