summaryrefslogtreecommitdiff
path: root/www/gpg.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/gpg.php')
-rw-r--r--www/gpg.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/www/gpg.php b/www/gpg.php
index 813ee31..241df30 100644
--- a/www/gpg.php
+++ b/www/gpg.php
@@ -83,9 +83,17 @@ function verifyEmail($email)
$state=0;
if($oldid == "0" && $CSR != "")
{
- if (runCommand('gpg --with-colons --homedir /tmp 2>&1',
- clean_gpgcsr($CSR),
- $gpg))
+ $err = runCommand('mktemp --directory /tmp/cacert_gpg.XXXXXXXXXX', $tmpdir);
+ if (!err && $tmpdir)
+ {
+ $err = runCommand("gpg --with-colons --homedir $tmpdir 2>&1",
+ clean_gpgcsr($CSR),
+ $gpg);
+
+ `rm -r $tmpdir`;
+ }
+
+ if ($err)
{
showheader(_("Welcome to CAcert.org"));