summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2015-01-16 18:54:46 +0100
committerBenny Baumann <BenBE@geshi.org>2015-01-16 18:54:46 +0100
commit2283bc4fff6e0d3c66b0636c3150de7bae360cb6 (patch)
treecd5dae54f0301e3aab71ab485d9ad98b6f7d0c10
parent1fd8530e35a384fd7ec6430cd97004726e1f8298 (diff)
parenta5ca55c677df9579c28bbb10e1a19d1b483609aa (diff)
downloadcacert-devel-2283bc4fff6e0d3c66b0636c3150de7bae360cb6.tar.gz
cacert-devel-2283bc4fff6e0d3c66b0636c3150de7bae360cb6.tar.xz
cacert-devel-2283bc4fff6e0d3c66b0636c3150de7bae360cb6.zip
Merge branch 'bug-1360' into testserver-stable
-rwxr-xr-xCommModule/client.pl13
1 files changed, 9 insertions, 4 deletions
diff --git a/CommModule/client.pl b/CommModule/client.pl
index 9d32469..08d7c6e 100755
--- a/CommModule/client.pl
+++ b/CommModule/client.pl
@@ -1087,15 +1087,20 @@ sub HandleGPG()
my $prefix="gpg";
my $short=int($row{'id'}/1000);
- my $csrname = "../csr/$prefix-".$row{'id'}.".csr";
- $csrname = "../csr/$prefix/$short/$prefix-".$row{'id'}.".csr" if($newlayout);
- SysLog("New Layout: "."../csr/$prefix/$short/$prefix-".$row{'id'}.".csr\n");
+
+ my $dirname="../csr";
+ $dirname="../csr/$prefix/$short" if ($newlayout);
+
+ #Ensure the directory exists
+ mkdir $dirname, 0755;
+
+ my $csrname = "$dirname/$prefix-".$row{'id'}.".csr";
+ SysLog("New Layout: $csrname\n");
#my $crtname = "../crt/$prefix-".$row{'id'}.".crt";
my $crtname=$csrname; $crtname=~s/^\.\.\/csr/..\/crt/; $crtname=~s/\.csr$/.crt/;
SysLog("New Layout: $crtname\n");
-
#my $csrname = "../csr/gpg-".$row{'id'}.".csr";
#my $crtname = "../crt/gpg-".$row{'id'}.".crt";