OpenVPN / easy-rsa

easy-rsa - Simple shell based CA utility
Other
4.07k stars 1.2k forks source link

Revoke command not deleting inline file #1242

Closed gcmlabs closed 1 month ago

gcmlabs commented 1 month ago

I'm using the latest version (3.2.1) and encountered an issue with the revoke command not removing the corresponding certificate file as expected.

According to the ChangeLog:

Inline files that contain private key data are now created in the sub-directory pki/inline/private.

While the sign-req command correctly creates the certificate file in pki/inline/private, when I run the revoke command the corresponding certificate file is not removed.

Upon inspecting the code, I noticed that within the revoke() function, the inline file is still being referenced with an outdated path:

inline_in="$in_dir/inline/${file_name_base}.inline"

It appears that the path should be updated to align with the new sub-directory structure in pki/inline/private.

TinCanTech commented 1 month ago

@gcmlabs Confirmed, thanks! :+1:

FTR, the inline file remains in the inline/private directory, thus, the file is still kept privately and will be over written, if necessary.

gcmlabs commented 1 month ago

Yeah I noticed that when renewing a certificate with expire, revoke-expired and sign-req the file will be over written. Otherwise if I'm just revoking clients certificates, the pki/inline/private dir will be full of unused files.