Commit 73fcb871 authored by Ad Schellevis's avatar Ad Schellevis

(proxy) cleanse cert output before writing

parent 08653da5
......@@ -44,8 +44,8 @@ if (is_file('/usr/local/etc/squid/ca.pem.id')) {
foreach ($config['ca'] as $ca) {
if (isset($ca['refid']) && $ca['refid'] == $cert_refid) {
$pem_contents = '';
$pem_contents .= base64_decode($ca['prv']);
$pem_contents .= base64_decode($ca['crt']);
$pem_contents .= trim(base64_decode($ca['prv'])) . "\n";
$pem_contents .= trim(base64_decode($ca['crt'])) . "\n";
$pem_contents .= ca_chain($ca);
echo "certificate generated\n";
file_put_contents('/var/squid/ssl/ca.pem', $pem_contents);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment