mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
(proxy) cleanse cert output before writing
This commit is contained in:
parent
08653da5ce
commit
73fcb8719f
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user