summaryrefslogtreecommitdiff
path: root/CommModule
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2014-01-15 00:48:07 +0100
committerMichael Tänzer <neo@nhng.de>2014-01-15 00:48:07 +0100
commit2c4c29221f7efcaa98ff3150e8563b2616d143da (patch)
treeadc5f3491472a47c5d8ed2b6decf7de4a39b6035 /CommModule
parentb9e886be937d8b8cd4625739968186633d87c36f (diff)
parentf0f37eabcb2554f78900396248a05cdee1626975 (diff)
downloadcacert-devel-2c4c29221f7efcaa98ff3150e8563b2616d143da.tar.gz
cacert-devel-2c4c29221f7efcaa98ff3150e8563b2616d143da.tar.xz
cacert-devel-2c4c29221f7efcaa98ff3150e8563b2616d143da.zip
Merge branch 'release' into bug-1195bug-1195
Conflicts: includes/account.php pages/account/6.php Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'CommModule')
-rwxr-xr-xCommModule/client.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/CommModule/client.pl b/CommModule/client.pl
index bf92b27..bd3eb02 100755
--- a/CommModule/client.pl
+++ b/CommModule/client.pl
@@ -834,8 +834,15 @@ sub HandleCerts($$)
my $days=$org?($server?(365*2):365):calculateDays($row{"memid"});
-
- $crt=Request($ver,1,1,$row{'rootcert'}-1,$profile,$row{'md'}eq"sha1"?2:0,$days,$row{'keytype'}eq"NS"?1:0,$content,$SAN,$subject);
+ my $md_id = 0;
+ $md_id = 1 if( $row{'md'} eq "md5");
+ $md_id = 2 if( $row{'md'} eq "sha1");
+ $md_id = 3 if( $row{'md'} eq "rmd160");
+ $md_id = 8 if( $row{'md'} eq "sha256");
+ $md_id = 9 if( $row{'md'} eq "sha384");
+ $md_id =10 if( $row{'md'} eq "sha512");
+
+ $crt=Request($ver,1,1,$row{'rootcert'}-1,$profile,$md_id,$days,$row{'keytype'}eq"NS"?1:0,$content,$SAN,$subject);
if(length($crt))
{
if($crt=~m/^-----BEGIN CERTIFICATE-----/)