mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
database_attribute: Deliver/create index.txt.attr
Fixes #11904 Since OpenSSL-1.1.0x the database attribute file for IPSec and OpenVPN wasn´t created while initial PKI generation. OpenVPN delivered an error message but IPSec did crashed within the first attempt. This problem persists also after X509 deletion and new generation. index.txt.attr will now be delivered by the system but also deleted and recreated while setting up a new x509. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
4c83d9fbdc
commit
e6f7f8e7ba
@@ -174,7 +174,12 @@ sub cleanssldatabase
|
||||
print FILE "";
|
||||
close FILE;
|
||||
}
|
||||
if (open(FILE, ">${General::swroot}/ovpn/certs/index.txt.attr")) {
|
||||
print FILE "";
|
||||
close FILE;
|
||||
}
|
||||
unlink ("${General::swroot}/ovpn/certs/index.txt.old");
|
||||
unlink ("${General::swroot}/ovpn/certs/index.txt.attr.old");
|
||||
unlink ("${General::swroot}/ovpn/certs/serial.old");
|
||||
unlink ("${General::swroot}/ovpn/certs/01.pem");
|
||||
}
|
||||
@@ -189,7 +194,11 @@ sub newcleanssldatabase
|
||||
if (! -s ">${General::swroot}/ovpn/certs/index.txt") {
|
||||
system ("touch ${General::swroot}/ovpn/certs/index.txt");
|
||||
}
|
||||
if (! -s ">${General::swroot}/ovpn/certs/index.txt.attr") {
|
||||
system ("touch ${General::swroot}/ovpn/certs/index.txt.attr");
|
||||
}
|
||||
unlink ("${General::swroot}/ovpn/certs/index.txt.old");
|
||||
unlink ("${General::swroot}/ovpn/certs/index.txt.attr.old");
|
||||
unlink ("${General::swroot}/ovpn/certs/serial.old");
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,12 @@ sub cleanssldatabase {
|
||||
print FILE "";
|
||||
close FILE;
|
||||
}
|
||||
if (open(FILE, ">${General::swroot}/certs/index.txt.attr")) {
|
||||
print FILE "";
|
||||
close FILE;
|
||||
}
|
||||
unlink ("${General::swroot}/certs/index.txt.old");
|
||||
unlink ("${General::swroot}/certs/index.txt.attr.old");
|
||||
unlink ("${General::swroot}/certs/serial.old");
|
||||
unlink ("${General::swroot}/certs/01.pem");
|
||||
}
|
||||
@@ -162,7 +167,11 @@ sub newcleanssldatabase {
|
||||
if (! -s ">${General::swroot}/certs/index.txt") {
|
||||
system ("touch ${General::swroot}/certs/index.txt");
|
||||
}
|
||||
if (! -s ">${General::swroot}/certs/index.txt.attr") {
|
||||
system ("touch ${General::swroot}/certs/index.txt.attr");
|
||||
}
|
||||
unlink ("${General::swroot}/certs/index.txt.old");
|
||||
unlink ("${General::swroot}/certs/index.txt.attr.old");
|
||||
unlink ("${General::swroot}/certs/serial.old");
|
||||
# unlink ("${General::swroot}/certs/01.pem"); numbering evolves. Wrong place to delete
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user