-
-
Notifications
You must be signed in to change notification settings - Fork 11k
APPS/req.c: Make -reqexts option an alias of -extensions
#16865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This simplifies code, doc, and use and fixes issue ignoring one or the other.
t8m
reviewed
Oct 20, 2021
t8m
approved these changes
Oct 20, 2021
Member
t8m
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved for master branch.
Collaborator
|
This pull request is ready to merge |
openssl-machine
pushed a commit
that referenced
this pull request
Oct 22, 2021
This simplifies code, doc, and use. Fixes issue ignoring one or the other. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from #16865)
Contributor
Author
|
Merged - thanks for the swift approval. |
encukou
added a commit
to encukou/cpython
that referenced
this pull request
Oct 7, 2024
`openssl req` fails with openssl 3.2.2 because the config line
authorityKeyIdentifier = keyid:always,issuer:always
is not supported for certificate signing requests (since the issuing
certificate authority is not known).
David von Oheimb, the OpenSSL dev that made the change, commented in:
openssl/openssl#22966 (comment) :
> This problem did not show up in older OpenSSL versions because of a bug:
> the `req` app ignored the `-extensions` option unless `-x505` is given,
> which I fixed in openssl/openssl#16865.
(I assume `-x505` is a typo for `-x509`.)
In our `make_cert_key` function:
If `sign` is true:
- We don't pass `-x509` to `req`, so in this case it should be safe to
omit the `-extensions` argument. (Old OpenSSL ignores it, new OpenSSL
fails on it.)
- The extensions are passed to the `ca` call later in the function.
There they take effect, and `authorityKeyIdentifier` is valid.
If `sign` is false, this commit has no effect except rearranging the
CLI arguments.
encukou
added a commit
to python/cpython
that referenced
this pull request
Oct 7, 2024
…GH-125045) gh-120762: make_ssl_certs: Don't set extensions for the CSR `openssl req` fails with openssl 3.2.2 because the config line authorityKeyIdentifier = keyid:always,issuer:always is not supported for certificate signing requests (since the issuing certificate authority is not known). David von Oheimb, the OpenSSL dev that made the change, commented in: openssl/openssl#22966 (comment) : > This problem did not show up in older OpenSSL versions because of a bug: > the `req` app ignored the `-extensions` option unless `-x505` is given, > which I fixed in openssl/openssl#16865. (I assume `-x505` is a typo for `-x509`.) In our `make_cert_key` function: If `sign` is true: - We don't pass `-x509` to `req`, so in this case it should be safe to omit the `-extensions` argument. (Old OpenSSL ignores it, new OpenSSL fails on it.) - The extensions are passed to the `ca` call later in the function. There they take effect, and `authorityKeyIdentifier` is valid. If `sign` is false, this commit has no effect except rearranging the CLI arguments.
nh2
added a commit
to nh2/internal-contstrained-pki
that referenced
this pull request
Oct 25, 2024
`-extensions v3_ca` was supported (and ingnored) by the `openssl req` of OpenSSL < 3.3 only due to a bug, see: * openssl/openssl#22966 * openssl/openssl#16865 See how Python fixed it similarly: * python/cpython@744caa8 In our code, the options that are problematic for `openssl req` but need to be set for `openssl x509` are set explicitly with the inline-generated `.ini` files. It still works with OpenSSL 3.0.
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
triaged: bug
The issue/pr is/fixes a bug
triaged: cleanup
The issue/pr deals with cleanup of comments/docs not altering code significantly
triaged: documentation
The issue/pr deals with documentation (errors)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When handling #16720, I noticed that the
-reqextsoption is ignored when the-x509option is used and the-extensionsoption is ignored otherwise. This is not only needlessly confusing but also is not in line with the documentation and with the-extensionsoption of thex509app.This PR solves the issue by making the
-reqextsoption an alias of-extensions.This also simplifies the code and cleans up the doc accordingly.
Checklist