mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Remove strongswan's cert directories and repopulate them, to ensure no removed CAs, certs, or CRLs remain. Ticket #5238
This commit is contained in:
parent
54a5275743
commit
f248cdc0fe
@ -176,6 +176,11 @@ function vpn_ipsec_configure($restart = false) {
|
||||
if (!is_dir("{$g['varetc_path']}/ipsec/ipsec.d")) {
|
||||
mkdir("{$g['varetc_path']}/ipsec/ipsec.d");
|
||||
}
|
||||
// delete these paths first to ensure old CAs, certs and CRLs aren't left behind. redmine #5238
|
||||
rmdir_recursive($capath);
|
||||
rmdir_recursive($keypath);
|
||||
rmdir_recursive($crlpath);
|
||||
rmdir_recursive($certpath);
|
||||
if (!is_dir($capath)) {
|
||||
mkdir($capath);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user