proposed workaround (works for me):
(create a dir /usr/local/extra/certs/, put cert files there) (I put any addition into /usr/local/extra)
certinstall script (which should be run e.g. on startup or manually:
This can easily be integrated into the squid package (and the certs could be entered via the web interface)
#!/usr/local/bin/php-cgi -f
$CERTBASE = "/usr/local/extra/certs/";
$CERTSTORE = "/usr/local/share/certs/";
$cafiles = glob($CERTBASE."*.{pem,crt}", GLOB_BRACE);
foreach ($cafiles as $cafile)
{
$cas = file($cafile);
$cert = 0;
foreach ($cas as $ca) {
if (preg_match("/–BEGIN CERTIFICATE--/", $ca)) {
$cert = 1;
}
if ($cert == 1) {
$crt .= $ca;
}
if (preg_match("/-END CERTIFICATE-/", $ca)) {
file_put_contents("/tmp/cert.pem", $crt, LOCK_EX);
$cert_hash = array();
exec("/usr/bin/openssl x509 -hash -noout -in /tmp/cert.pem", $cert_hash);
if (! file_exists ($CERTSTORE . $cert_hash[0] . ".0"))
{
file_put_contents($CERTSTORE . $cert_hash[0] . ".0", $crt, LOCK_EX);
}
$crt = "";
$cert = 0;
}
}
}
unlink("/tmp/cert.pem");
?>