]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commit
vpnmain.cgi: Fixes bug13737 - remove unneeded &cleanssldatabase calls
authorAdolf Belka <adolf.belka@ipfire.org>
Tue, 1 Apr 2025 18:07:57 +0000 (20:07 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 Apr 2025 09:57:08 +0000 (09:57 +0000)
commit65434dcc7bc297e7d2feabd68f93de1eace598f3
treec9b941a5a25f8e545f70301e64599217a8686f76
parent7ee3ce2371504df0e14b6cb19437d5290f38a6f1
vpnmain.cgi: Fixes bug13737 - remove unneeded &cleanssldatabase calls

- This first part removes all usages of &cleanssldatabase with the client certificates.
   This is not needed here. If used then the serial number would be moved back to 01 when
   an existing client certificate is removged or a new one created, even if no errors
   occurred.
- The usage of &cleanssldatabase has also been removed from the root/host cert creation
   if it was successful, otherwise the index file is moved back to being empty and the
   serial file to containing 01.
- The only usage now of the &cleanssldatabase is for when the root/host cert set is
   being created or if an uploaded cert has been checked as good to install.
- This now means that each time a new client certificate is created the serial number
   is incremented.
- The removal of the x509 root/host cert also unlinks all .pem files in the certs
   directory and therefore also all the 01.pem, 02.pem etc files so the
   &cleanssldatabase routine no longer needs to unlink the 01.pem file
- The &newcleanssldatabase script is no longer needed, as the &cleanssldatabase commands
   used covers the required cleaning, so it has been removed.
- This patch together with the others from this set have been tested out on my vm system
   and I was able to create a new root/host cert set and then new client certs and make
   an ipsec certificate connection successfully. I could then renew the host cert and
   the client connection still worked.

Fixes: bug13737
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/vpnmain.cgi