summaryrefslogtreecommitdiff
path: root/CommModule/client.pl
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2014-01-08 02:22:50 +0100
committerMichael Tänzer <neo@nhng.de>2014-01-08 02:22:50 +0100
commit3989d2727b834099f520913307a5e157389d7392 (patch)
tree1a3aad9d972a098f465fe44d72f0d0c5547a85d9 /CommModule/client.pl
parent3776e3e77823df820f25cedd68d0fc9bd280646a (diff)
parent0f08a1c6681a872d0229ef950edc57b4630122d2 (diff)
downloadcacert-devel-3989d2727b834099f520913307a5e157389d7392.tar.gz
cacert-devel-3989d2727b834099f520913307a5e157389d7392.tar.xz
cacert-devel-3989d2727b834099f520913307a5e157389d7392.zip
Merge remote-tracking branch 'origin/bug-1237' into testserver-stable
Diffstat (limited to 'CommModule/client.pl')
-rwxr-xr-xCommModule/client.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/CommModule/client.pl b/CommModule/client.pl
index 002b661..f396dcb 100755
--- a/CommModule/client.pl
+++ b/CommModule/client.pl
@@ -834,8 +834,15 @@ sub HandleCerts($$)
my $days=$org?($server?(30):7):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);
+ $md_id = 0;
+ $md_id = 1 if( $raw{'md'} eq "md5");
+ $md_id = 2 if( $raw{'md'} eq "sha1");
+ $md_id = 3 if( $raw{'md'} eq "rmd160");
+ $md_id = 8 if( $raw{'md'} eq "sha256");
+ $md_id = 9 if( $raw{'md'} eq "sha384");
+ $md_id =10 if( $raw{'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-----/)