bug 1017: Read the certificate before sending it
authorMichael Tänzer <neo@nhng.de>
Tue, 16 Apr 2013 20:01:41 +0000 (22:01 +0200)
committerMichael Tänzer <neo@nhng.de>
Tue, 16 Apr 2013 20:01:41 +0000 (22:01 +0200)
Signed-off-by: Michael Tänzer <neo@nhng.de>
pages/account/6.php

index 6168db9..2123e2b 100644 (file)
@@ -96,6 +96,10 @@ if (array_key_exists('format', $_REQUEST)) {
                _("Download the certificate in DER format")."</a></p>\n";
 
        echo "<br /><br /><br />";
+       
+       // Allow to directly copy and paste the cert in PEM format 
+       $crtname=escapeshellarg($row['crt_name']);
+       $cert = `/usr/bin/openssl x509 -in $crtname -outform PEM`;
        echo "<pre>$cert</pre>";
 
        showfooter();