【问题标题】:is it possible to verify certificate chain using openssl while skipping the expiry date是否可以在跳过到期日期的同时使用 openssl 验证证书链
【发布时间】:2021-12-06 08:20:31
【问题描述】:

我们正在与 AWS Nitro 合作,它只提供 3 小时的证书。

我们正在寻找一种方法,我们可以在验证中跳过到期部分并仍然确认证书链有效。

【问题讨论】:

标签: openssl x509certificate


【解决方案1】:

要禁止检查证书的到期日期,请使用 X509_V_FLAG_NO_CHECK_TIME 标志:

X509_STORE_set_flags (store, other_flags | X509_V_FLAG_NO_CHECK_TIME);

X509_V_FLAG_NO_CHECK_TIME 标志禁止根据当前时间检查证书和 CRL 的有效期。

似乎没有办法在命令行上设置此选项。

【讨论】:

    【解决方案2】:

    您可以将-days 选项与x509 命令一起使用。

    例如:

    openssl x509 -days
    

    我不确定与openssl req 合作的天数,因为有效性决定了x509。

    【讨论】:

      【解决方案3】:

      根据 openssl-verify 文档

             -attime timestamp
                 Perform validation checks using time specified by timestamp and not current system time. timestamp is the number of seconds since 01.01.1970 (UNIX time).
      

      如果您将标志的值指定为到期前的某个时间,它将帮助您跳过到期检查,因为它始终返回 true。

      【讨论】:

        猜你喜欢
        • 2018-08-13
        • 1970-01-01
        • 1970-01-01
        • 2018-09-09
        • 2013-04-23
        • 2020-06-26
        • 2017-07-05
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多