renew-ca command does not copy subject from old CA
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- shell
- Domain
- cryptography, security
Research direction
Start from the easyrsa shell entry point and the renew-ca command path, then follow where the new CA request is built and where the old subject is read from the archived certificate. Reproduce by creating a CA with EASYRSA_DN=org, switching to cn_only, and running ./easyrsa renew-ca; compare the new subject with pki/expired-ca.list. Done looks like the renewed CA preserves the full old subject, or the command warns before replacing it, with existing leaf certificates still verifying.
Written by the indexing model from the issue text.
Description
When renewing a CA generated using org after changing EASYRSA_DN to cn_only, the renewed CA only inherits the CN from the old CA, breaking the chain of trust for leaves.
Seems like a saner default to inherit the entire subject by default to avoid this? Or at least issue a warning that the renewed CA will not work for existing leaf certificates, and all leaf certificates will need to be regenerated as well.
$ sudo easyrsa renew-ca
Using Easy-RSA 'vars' configuration:
* /etc/easy-rsa/vars
SHA2-256(/etc/easy-rsa/pki/ca.crt)= <...>
Enter pass phrase for /etc/easy-rsa/pki/private/ca.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Common Name (eg: your user, host, or server name) [Henry Tung (CA)]:
NEW CA CERTIFICATE:
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
<...>
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=Henry Tung (CA)
Validity
Not Before: Nov 18 00:32:39 2026 GMT
Not After : Nov 15 00:32:39 2036 GMT
Subject: CN=Henry Tung (CA)
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
<...>
Exponent: <...>
X509v3 extensions:
X509v3 Basic Constraints: critical
CA:TRUE
X509v3 Subject Key Identifier:
<...>
X509v3 Authority Key Identifier:
<...>
X509v3 Key Usage:
Certificate Sign, CRL Sign
Signature Algorithm: sha256WithRSAEncryption
Signature Value:
<...>
WARNING !!!
Your CA certificate is ready to be renewed. (Details above)
This new CA certificate will completely replace the old one.
The old CA will be archived to the 'expired-ca.list' file.
Please check the details above are correct, before continuing.
Type the word 'yes' to continue, or any other input to abort.
Install the new CA certificate ? yes
Notice
------
CA certificate has been successfully renewed.
Your old CA certificate has been added to the expired CA list at:
* /etc/easy-rsa/pki/expired-ca.list
Your renewed CA certificate is at:
* /etc/easy-rsa/pki/ca.crt
$ cat pki/expired-ca.list
# Easy-RSA expired CA certificate list:
# =====================================
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
<...>
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=<...>, ST=<...>, L=<...>, O=<...>, OU=<...>, CN=Henry Tung (CA), emailAddress=<...>
Validity
Not Before: Dec 28 05:31:55 2016 GMT
Not After : Dec 26 05:31:55 2026 GMT
Subject: C=<...>, ST=<...>, L=<...>, O=<...>, OU=<...>, CN=Henry Tung (CA), emailAddress=<...>
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
<...>
Exponent: <...>
X509v3 extensions:
X509v3 Subject Key Identifier:
<...>
X509v3 Authority Key Identifier:
<...>
X509v3 Basic Constraints:
CA:TRUE
X509v3 Key Usage:
Certificate Sign, CRL Sign
Signature Algorithm: sha256WithRSAEncryption
Signature Value:
<...>
-----BEGIN CERTIFICATE-----
<...>
-----END CERTIFICATE-----
$
- Dominant language
- Shell
- Stars
- 4.5k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenVPN/easy-rsa
-
typosPossibly taken @TinCanTech claimed this 27 days ago. Opendocumentation
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
-
documentation feedback welcome Sticky
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Add #1479 to `ChangeLog`Possibly taken @TinCanTech claimed this 27 days ago. Open
-
Naming convention defined by the SECG is not allowed in the var file due to migration to genpkeyMay be free again @TinCanTech claimed this 44 days ago, and no pull request is open. Opendiscussion
-
Correct `$EASYRSA_ALIAS_DAYS` to lower case and not be exportableMay be free again @TinCanTech claimed this 53 days ago, and no pull request is open. Open
All issues in OpenVPN/easy-rsa
Similar issues
-
bug report-to-upstream
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
flatpark/flatpark#1424 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
[bug] Docker Compose version check in auto-install.sh fails on non-Debian systems (dpkg not found)Possibly taken @shaneintentionboi06 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openwisp/docker-openwisp#771 ·
Maintainers usually reply within 1 day
-
needs-you
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
catalystneuro/encore#860 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100