diff --git a/pages/account/6.php b/pages/account/6.php index ae72730..0054b7a 100644 --- a/pages/account/6.php +++ b/pages/account/6.php @@ -14,12 +14,15 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ ?> -"._("Installing your certificate")."\n"; - echo "

"._("You are about to install a certificate, if you are using mozilla/netscape based browsers you will not be informed that the certificate was installed successfully, you can go into the options dialog box, security and manage certificates to view if it was installed correctly however.")."

\n"; - echo "

"._("Click here")." "._("to install your certificate.")."

\n"; - showfooter(); - exit; - } - } else { - showheader(_("My CAcert.org Account!")); -?> -

+ $cert = `/usr/bin/openssl x509 -in $crtname $outform`; -

+ header("Content-Type: application/pkix-cert"); + header("Content-Length: ".strlen($cert)); - - - -

-"> -
+ $fname = sanitizeFilename($row['CN']); + if ($fname=="") $fname="certificate"; + header("Content-Disposition: attachment; filename=\"${fname}.${extension}\""); -

+ echo $cert; + exit; - - -

-
+} else { + showheader(_("My CAcert.org Account!"), _("Install your certificate")); + echo ''; + + // 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 "
$cert
"; + ?>
- + 0) @@ -213,4 +183,4 @@