-
Notifications
You must be signed in to change notification settings - Fork 1.2k
--subca-len=X sign-req ca honour user set critical flag in ca
#692
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
Conversation
During sign_req with crt_type = ca, check for critical flag presence in basicConstraints (but only the last encountered occurance).
|
I do note that the awk check (and example grep-tail-grep pipe) are performed with case sensitive 'critical': openssl rejects as invalid both 'CRITICAL' and 'Critical' (other capitalisation variations were not checked -as they are likely an unintended bug in upstream openssl). |
|
I am leaning more toward having an option something like:
Assign basic constraint
|
This seems like a lot of extra work (i.e. always remembering to set the command line arg) for a user who defaults to having With EDIT: To be clear, I think modifying the x509-types files SHOULD be the way supported extensions are set (except for rare circumstances). |
|
An additional drawback of |
I was only leaning. I agree with your point about permanently editing Bottom line: Your |
|
This has been a long standing issue for EasyRSA, as noted by this comment: Source: It is also a rare use case. I think this should go into |
|
@dekeonus this needs a |
- move initialisation of awkchkcrit variable to inside the
'{ group } > extension_temp' redirect
- rework the awkscript (awkchkcrit) to extract the last occurrence of
basicConstraints rather than being a test on exit code.
Note awkchkcrit is relying upon openssl's extension parsing behaviour if
pathlen:X is already in the basicConstraints line a new
pathlen:[cmd_arg] will be appended to the line. Openssl only keeps the
last instance of pathlen it encounters on the line
an example extension_temp generated with pathlen:9 in x509-types/ca results in a cert with pathlen:1 |
|
There is also a Due to complications, this has to be moved to v3.1.2 - Planned changes milestone. |
Without a user calling openssl directly, is there still a code path that doesn't override easyrsa_ca with the extensions in x509-types/ca? As |
pushed back from 3.1.1, so remove now invalid changelog entry
During sign_req with crt_type = ca and $EASYRSA_SUBCA_LEN set, check for critical flag presence in existing basicConstraints within the ca file.
Note as the user may have something like:
only check the last occurrence of basicConstraints
While I have used awk to solve this, a
grep |tail |grepcould also be used:Addresses #691 and partial solution for #448 (noting that
build-canow pulls in COMMON and ca this should be the last piece needed)