diff options
author | Michael Tänzer <neo@nhng.de> | 2014-03-21 16:34:32 +0100 |
---|---|---|
committer | Michael Tänzer <neo@nhng.de> | 2014-03-21 16:34:32 +0100 |
commit | cff982918cd654ab9028ecc10b1ea3b2592ad9be (patch) | |
tree | 20bad73fa37cabdda7a7d99f1e2b3f1dd9fd954a /CommModule/client.pl | |
parent | f2e19ca512ab11d6eb17ea21efd2c36bedffe65a (diff) | |
parent | 8568089afac180c1f3ff323a8775f974071a5cda (diff) | |
download | cacert-devel-cff982918cd654ab9028ecc10b1ea3b2592ad9be.tar.gz cacert-devel-cff982918cd654ab9028ecc10b1ea3b2592ad9be.tar.xz cacert-devel-cff982918cd654ab9028ecc10b1ea3b2592ad9be.zip |
Merge branch 'release' into bug-1221
Diffstat (limited to 'CommModule/client.pl')
-rwxr-xr-x | CommModule/client.pl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/CommModule/client.pl b/CommModule/client.pl index 1d87adb..532761e 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-----/) |