[18-Mar-2022 00:29:44 America/Toronto] PHP Warning: openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate! in /usr/local/etc/inc/plugins.inc.d/ipsec.inc on line 1257[39675810-00da-4d28-b42b-1befc06e7261] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'"" /usr/local/sbin/pluginctl: Error: Invalid certificate hash info for
o ipsec: clean up stale CA certificates on reconfigure
include strongswan.opnsense.d/*.conf
$strongswan = generate_strongswan_conf($strongswanTree); $strongswan .= "\ninclude strongswan.opnsense.d/*.conf\n"; @file_put_contents("/usr/local/etc/strongswan.conf", $strongswan); /* generate CA certificates files */ $cafiles = []; foreach (isset($config['ca']) ? $config['ca'] : [] as $ca) { $cert = base64_decode($ca['crt']); $x509cert = openssl_x509_parse(openssl_x509_read($cert)); if (is_array($x509cert) && isset($x509cert['hash'])) { $fname = "{$capath}/{$x509cert['hash']}.0.crt"; $cafiles[] = $fname; if (!@file_put_contents($fname, $cert)) { log_error(sprintf('Error: Cannot write IPsec CA file for %s', $ca['descr'])); } } else { log_error(sprintf('Error: Invalid certificate hash info for %s', $ca['descr'])); } } foreach (glob("{$capath}/*.0.crt") as $fname) { if (!in_array($fname, $cafiles)) { unlink($fname); } }
[18-Mar-2022 11:15:55 America/Toronto] PHP Warning: openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate! in /usr/local/etc/inc/plugins.inc.d/ipsec.inc on line 1257
2022-03-18T11:15:55-04:00 Error opnsense /usr/local/sbin/pluginctl: Error: Invalid certificate hash info for
Date Severity Process Line2022-03-18T11:39:05-04:00 Error configd.py [033c924d-1574-4bd8-ac18-241d0f3451d6] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'"" 2022-03-18T11:39:04-04:00 Error configd.py [6ebc7f84-633f-4128-ba8a-d0c7a1daed63] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'"" 2022-03-18T11:39:00-04:00 Error configd.py [ff5483fa-5c54-45ac-b74b-c6b8eb5de680] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'"" 2022-03-18T11:38:02-04:00 Error configd.py [5828834c-f694-474c-9a54-ac9208347813] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'"" 2022-03-18T11:38:00-04:00 Error configd.py [f26a48ad-5c5d-4452-bdf0-d79e4be1e386] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'"" 2022-03-18T11:37:58-04:00 Error configd.py [c1f4a1c2-9b18-4e8f-a1a5-b537e9bffd14] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'"" 2022-03-18T11:37:54-04:00 Error configd.py [da8d2b3a-d68e-43f2-8d7b-fd5e24d6dafc] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'"" 2022-03-18T11:15:55-04:00 Error configd.py [39675810-00da-4d28-b42b-1befc06e7261] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'"" 2022-03-18T11:15:53-04:00 Error configd.py [714f0020-e64e-4654-8f27-231d1e7c6c3d] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'"" 2022-03-18T11:15:49-04:00 Error configd.py [b16026ba-b84b-458a-a53a-269ccb139bc4] Script action stderr returned "b"no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'""