TinCanTech / easy-tls

Manage and Inline OpenVPN TLS keys and Easy-RSA PKI credentials. Supports OpenVPN TLS-Crypt-V2 key system and OpenVPN Peer-Fingerprint mode.
GNU General Public License v2.0
86 stars 19 forks source link

Recover from missing inline file #290

Open bob-zscharnagk opened 2 years ago

bob-zscharnagk commented 2 years ago

I manually deleted an inline file from the pki folder. Now I can't get rid of the error message or seemingly generate any new inline file. How do I resolve this?

TinCanTech commented 2 years ago

Hi, can you please post the error message that you are seeing.

bob-zscharnagk commented 2 years ago

./easytls ita external 0

Easy-TLS 2.7.0.0.0 OpenVPN 2.5.7 OpenSSL 1.1.1o 3 May 2022 Error: Missing file: C:/Progra~1/OpenVPN/Easy-RSA/pki/easytls/external.inline

./easytls ri external

Easy-TLS 2.7.0.0.0 OpenVPN 2.5.7 OpenSSL 1.1.1o 3 May 2022 Error: Missing file: C:/Progra~1/OpenVPN/Easy-RSA/pki/easytls/external.inline

./easytls inline-index-rebuild

Easy-TLS 2.7.0.0.0 OpenVPN 2.5.7 OpenSSL 1.1.1o 3 May 2022 Error: Missing file: C:/Progra~1/OpenVPN/Easy-RSA/pki/easytls/external.inline

./easytls s

Easy-TLS 2.7.0.0.0 OpenVPN 2.5.7 OpenSSL 1.1.1o 3 May 2022 Error: Missing file: C:/Progra~1/OpenVPN/Easy-RSA/pki/easytls/external.inline

TinCanTech commented 2 years ago

Please try with current version 2.8.0

Please make sure you backup what you currently have.

The new version will re-index correctly and should allow you to continue.

The command you need with the new version is easytls rehash

bob-zscharnagk commented 2 years ago

That is shown as being 2.7.0 which is what I have.

./easytls rehash Easy-TLS 2.7.0.0 OpenVPN 2.5.7 OpenSSL 1.1.1o 3 May 2022 Error: Missing file: C:/Progra~1/OpenVPN/Easy-RSA/pki/easytls/external.inline

TinCanTech commented 2 years ago

You require this: https://github.com/TinCanTech/easy-tls/blob/81b1c299a56b52926e44a725d0e59753dfe2aa61/easytls#L9293

See the link above.

bob-zscharnagk commented 2 years ago

OK tried that and got

./easytls rehash

Rehash completed successfully. Error log: Error: Missing file: C:/Program Files/OpenVPN/Easy-RSA/pki/easytls/external.inline Easy-TLS 2.8.0 (0) EasyRSA Shell

TinCanTech commented 2 years ago

Hopefully, you can now use easytls remove-inline external, please try.

bob-zscharnagk commented 2 years ago

./easytls ri external

Error log: Error: Missing file: C:/Program Files/OpenVPN/Easy-RSA/pki/easytls/external.inline Easy-TLS 2.8.0 (0) EasyRSA Shell

bob-zscharnagk commented 2 years ago

I don't know if it's relevant but in 2..7.0 the path was c:/progra~1 and in 2.8.0 it's c:/program files.

TinCanTech commented 2 years ago

Hopefully the space in the PATH is taken care of.

I will look into this later today.

Thanks for feeding back.

TinCanTech commented 2 years ago

One thing you could try is to make the inline file again.

aazudd commented 1 year ago

Same pain for me after removing an inline file via CLI. [Easy-TLS 2.7.0]

1/ Comment the line of the node related to the error message in the easytls/data/easytls-inline-index.txt 2/ ./easytls rehash

The error message does not appear anymore and the usage of ./easytls is fine