doc: Add documentation for X509_STORE_CTX_set_time#29899
Conversation
Document the X509_STORE_CTX_set_time() function which sets the verification time for certificate chain validation. This is a convenience wrapper around X509_VERIFY_PARAM_set_time(). Remove X509_STORE_CTX_set_time from missingcrypto.txt and missingcrypto111.txt. Fixes openssl#21362 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
73a5315 to
eafeefe
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
n13l
left a comment
There was a problem hiding this comment.
Looks good, thanks. I think it deserves another review.
| By default, the current system time is used for certificate verification. | ||
| Setting a specific time is useful for testing or when verifying historical | ||
| certificates. | ||
| The I<flags> parameter is currently ignored and should be set to 0. |
There was a problem hiding this comment.
Ugh, the 0 check is not enforced, and the parameter ultimately cannot be used in future anyway, so the sentence can be shortened as The I<flags> parameter is ignored..
| X509_STORE_CTX_set_cert(), | ||
| X509_STORE_CTX_set0_crls() and X509_STORE_CTX_set0_param() do not return | ||
| values. | ||
| X509_STORE_CTX_set0_crls(), X509_STORE_CTX_set0_param() and |
| purpose is I<X509_TRUST_DEFAULT> and I<trust> is 0 then the default trust id | ||
| associated with the I<def_purpose> value is used for the trust setting instead. | ||
|
|
||
| X509_STORE_CTX_set_time() sets the verification time in I<ctx> to I<t>. |
There was a problem hiding this comment.
Ugh, both it and X509_VERIFY_PARAM_set_time(3) should specify what t is, which is POSIX time (seconds since 1970-01-01T00:00:00Z, excluding leap seconds), and likely reference OPENSSL_tm_to_posix(3).
|
Thanks for the review @esyr. Pushed a fixup addressing all three points:
|
| which is a POSIX time value representing seconds since 1970-01-01T00:00:00Z | ||
| (see L<OPENSSL_tm_to_posix(3)>). |
There was a problem hiding this comment.
The wording is a bit clunky, after all, but the idea is clear now (hopefully).
|
This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago |
|
This pull request is ready to merge |
|
Merged to master. Thank you! |
Document the X509_STORE_CTX_set_time() function which sets the verification time for certificate chain validation. This is a convenience wrapper around X509_VERIFY_PARAM_set_time(). Remove X509_STORE_CTX_set_time from missingcrypto.txt and missingcrypto111.txt. Fixes #21362 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org> Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org> MergeDate: Sun May 3 15:38:26 2026 (Merged from #29899)
Document the X509_STORE_CTX_set_time() function which sets the verification time for certificate chain validation. This is a convenience wrapper around X509_VERIFY_PARAM_set_time(). Remove X509_STORE_CTX_set_time from missingcrypto.txt and missingcrypto111.txt. Fixes openssl#21362 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org> Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org> MergeDate: Sun May 3 15:38:26 2026 (Merged from openssl#29899)
Summary
Fixes #21362
Test plan
🤖 Generated with Claude Code