From 6a9bdaf70a7b4db76629d7afe45ed0f704ba9925 Mon Sep 17 00:00:00 2001 From: John Crisp Date: Fri, 21 Feb 2020 15:07:29 +0100 Subject: [PATCH] Remove email address from file name and add download option --- search.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/search.php b/search.php index 8f63256..2d63bda 100644 --- a/search.php +++ b/search.php @@ -36,9 +36,14 @@ case display: case 'download': $rec = CAdb_get_entry($serial); - upload("$config[cert_dir]/$serial.der", "$rec[common_name] ($rec[email]).cer", 'application/pkix-cert'); + upload("$config[cert_dir]/$serial.der", "$rec[common_name].cer", 'application/pkix-cert'); break; +case 'download_pem': + $rec = CAdb_get_entry($serial); + upload("$config[new_certs_dir]/$serial.pem", "$rec[common_name].pem", 'application/pkix-cert'); + break; + case search: printHeader('public'); @@ -97,6 +102,7 @@ case search: if ($rec['status'] != 'Revoked') { ?> Download + Download (in PEM format) ';