Skip to content

doc: Add documentation for X509_STORE_CTX_set_time#29899

Closed
kovan wants to merge 3 commits into
openssl:masterfrom
kovan:fix/doc-x509-store-ctx-set-time
Closed

doc: Add documentation for X509_STORE_CTX_set_time#29899
kovan wants to merge 3 commits into
openssl:masterfrom
kovan:fix/doc-x509-store-ctx-set-time

Conversation

@kovan
Copy link
Copy Markdown
Contributor

@kovan kovan commented Feb 2, 2026

Summary

  • Document the X509_STORE_CTX_set_time() function
  • This is a convenience wrapper around X509_VERIFY_PARAM_set_time()
  • Sets the verification time for certificate chain validation
  • Remove function from missingcrypto.txt and missingcrypto111.txt

Fixes #21362

Test plan

  • podchecker passes
  • doc-nits passes
  • Removed function from missingcrypto*.txt

🤖 Generated with Claude Code

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>
@kovan kovan force-pushed the fix/doc-x509-store-ctx-set-time branch from 73a5315 to eafeefe Compare February 2, 2026 13:01
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@n13l n13l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks. I think it deserves another review.

@openssl-machine openssl-machine added the approval: review pending This pull request needs review by a committer label Mar 26, 2026
@n13l n13l requested a review from t8m March 26, 2026 11:12
Copy link
Copy Markdown
Member

@esyr esyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify what t is.

Comment thread doc/man3/X509_STORE_CTX_new.pod Outdated
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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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..

Comment thread doc/man3/X509_STORE_CTX_new.pod Outdated
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: s/ and/, and.

Comment thread doc/man3/X509_STORE_CTX_new.pod Outdated
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>.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@esyr esyr added triaged: documentation The issue/pr deals with documentation (errors) branch: master Applies to master branch labels Mar 26, 2026
@kovan
Copy link
Copy Markdown
Contributor Author

kovan commented Mar 26, 2026

Thanks for the review @esyr. Pushed a fixup addressing all three points:

  1. Clarified that t is POSIX time (seconds since 1970-01-01T00:00:00Z) with a reference to OPENSSL_tm_to_posix(3)
  2. Simplified to "The I parameter is ignored."
  3. Added Oxford comma

Copy link
Copy Markdown
Member

@esyr esyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you.

Comment on lines +282 to +283
which is a POSIX time value representing seconds since 1970-01-01T00:00:00Z
(see L<OPENSSL_tm_to_posix(3)>).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording is a bit clunky, after all, but the idea is clear now (hopefully).

@openssl-machine
Copy link
Copy Markdown
Collaborator

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

@esyr esyr requested a review from a team April 26, 2026 00:20
@openssl-machine openssl-machine added approval: done This pull request has the required number of approvals approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: review pending This pull request needs review by a committer approval: done This pull request has the required number of approvals labels Apr 27, 2026
@openssl-machine
Copy link
Copy Markdown
Collaborator

This pull request is ready to merge

@t8m t8m added the tests: exempted The PR is exempt from requirements for testing label Apr 29, 2026
@jogme
Copy link
Copy Markdown
Contributor

jogme commented May 3, 2026

Merged to master. Thank you!

@jogme jogme closed this May 3, 2026
openssl-machine pushed a commit that referenced this pull request May 3, 2026
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)
jericson pushed a commit to jericson/openssl that referenced this pull request May 9, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch tests: exempted The PR is exempt from requirements for testing triaged: documentation The issue/pr deals with documentation (errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: X509_STORE_CTX_set_time missing from online documentation?

7 participants