-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Older certs for a CN cannot be revoked #626
Comments
From version There is also a new command There is also another new command I do not know what the plans are for EasyRSA versions prior to version I do not expect there to be a way to switch between |
@tecoboot would you consider testing version That would help us a great deal. |
To test, simply make a copy of your current PKI and download To save your currently renewed certificates you need to use:
Then you can revoke a renewed certificate by using:
Finally, update your Certificate Revocation List [CRL]:
|
EasyRSA version
Tempting tools for upgrading .. 🍰 🍺 |
Linking #609 |
OK, I'll produce test results. Attached test result with master. Issue 626 - problem.txt Couple of findings:
|
There is an issue with show-expire caused by the older but still valid certs: .. show-expire: Line is: if [ "$cert_expire_date_s" -lt "$cutoff_date_s" ]; then Error (with bash -x): + '[' '' -lt 1667721397 ']' Before: + cert_expire_date_s= So $cert_expire_date_s is empty. The older certs were indeed not expired. These are the certs that I want to see with show-older (or a better command). |
The rewind-renew doesn't work for these older certs. Easy-RSA error: The problem is that the certs were not renewed but added with sign-req's. |
Here first attempt to fix show-expire or basics for show-older:
|
@tecoboot thanks for testing.
True - However, the only serious difference is that the preferred location of
That is correct functionality.
That must be a bug, I'll have to take a closer look.
That can be addressed and fixed.
From what I can gather here; You created your client-1 multiple certificates in a completely unsupported way, on a PKI that should not allow you to create duplicate CN certificates.
|
For |
Thanks for your work, I'll take a closer look soon. |
Your work for |
OK now. |
OK, with the protection by 5b4fd2b it is not needed. With the patch, the to be revoked certs also cannot exists. I'm a bit concerned on installed easyrsa, that lacks the protection. Updating in for example Debian takes some time (years). |
The show-all function: ./easyrsa --renew-days=99999 show-expire |
Have a fix for the "corrupt" PKI?
|
The I would need to see your |
I revoked the fix and reran the testscript.
|
Here 2 errors:
|
From your
However, there exists only one certificate file:
You have over-written your original certificate twice. Obviously, Thanks for your time and feedback 👍 |
This turned out to be a bug in my The correct command is:
Lines 3298 to 3309 in 5b4fd2b
There is still something going wrong though, otherwise it should fail for all dates ... weird. Still working on this one .. |
I'll have made a revoke-untracked-certs cleanup script. It revokes all "untracked" serials.
Results:
|
For the record:
I will not consider any code to change this new method. If bugs are found then they can be fixed but that is all. |
What to do with this one? I'm still not happy with the possibility having PKI's around that are not healthy but where easyrsa doesn't complain. |
The solution is to back-port version I do not know what the plan is or even if a plan exists. @ecrist Any comment ? My answer is simple: Upgrade your |
With the unique_subject set to no, it is possible to add unlimited certs for a CN.
EasyRSA only maintains all info for the last issued cert for a CN. Earlier created certs for a CN are tracked by their serial and serial.pem is available. This makes it not so easy to manage.
EasyRSA has no function to list all issued certs and to revoke the older issued certs for a CN. List can be done with cat | grep index.txt, revoke is almost impossible.
This problem is created with the work_in_progress for renewal (#286).
IMHO, because EasyRSA is updated to manage multiple issued certs for a CN, it must keep track of all of these and not only the last issued cert.
One method solving the issue would be to restructure the database, with a single copy of items which will be kept forever and usage of symbolic links in various folders. This could be difficult to implement for non-*x systems.
Or just use current data for list and revoke. Maybe index.txt is enough to support commands like list-certs [ all | valid | revoked ] (instead of cat index.txt or egrep ^V index.txt / egrep ^R index.txt). And the revoke-all < filename_base > and revoke-older < filename_base > commands to revoke all or the older certs for a CN. Maybe add a revoke-serial < serial > .
Meanwhile, unique_subject = yes has to be supported. For users that want to keep the EasyRSA2 behaviour can put it on yes. So maybe implement a unique_subject yes | no command and keep it on yes until the issues are fixed..
The text was updated successfully, but these errors were encountered: