Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 406668 Details for
Bug 540622
app-crypt/tinyca: removal (was: fix digest algorithm GUI selection and Add SHA256/384/512 support)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to add sha256/384/512 as digest algorithm
tinyca-2.0.7.5-sha-256-384-512.patch (text/plain), 5.72 KB, created by
Zentoo
on 2015-07-13 15:01:04 UTC
(
hide
)
Description:
patch to add sha256/384/512 as digest algorithm
Filename:
MIME Type:
Creator:
Zentoo
Created:
2015-07-13 15:01:04 UTC
Size:
5.72 KB
patch
obsolete
>diff -Naur a/usr/share/tinyca/lib/CA.pm b/usr/share/tinyca/lib/CA.pm >--- a/usr/share/tinyca/lib/CA.pm 2015-07-13 16:53:13.505969045 +0200 >+++ b/usr/share/tinyca/lib/CA.pm 2015-07-13 16:52:01.385807714 +0200 >@@ -1062,6 +1062,7 @@ > 'outdir' => $self->{$ca}->{'dir'}."/newcerts/", > 'keyfile' => $self->{$ca}->{'dir'}."/cacert.key", > 'cacertfile' => $self->{$ca}->{'dir'}."/cacert.pem", >+ 'digest' => $opts->{'digest'}, > 'pass' => $opts->{'passwd'}, > 'days' => $opts->{'days'}, > 'parentpw' => $opts->{'parentpw'}, >diff -Naur a/usr/share/tinyca/lib/CERT.pm b/usr/share/tinyca/lib/CERT.pm >--- a/usr/share/tinyca/lib/CERT.pm 2015-07-13 16:53:13.505969045 +0200 >+++ b/usr/share/tinyca/lib/CERT.pm 2015-07-13 16:52:01.387807719 +0200 >@@ -479,7 +479,10 @@ > if($opts->{'incfp'}) { > $out = ''; > $out .= "Fingerprint (MD5): $opts->{'parsed'}->{'FINGERPRINTMD5'}\n"; >- $out .= "Fingerprint (SHA1): $opts->{'parsed'}->{'FINGERPRINTSHA1'}\n\n"; >+ $out .= "Fingerprint (SHA1): $opts->{'parsed'}->{'FINGERPRINTSHA1'}\n"; >+ $out .= "Fingerprint (SHA256): $opts->{'parsed'}->{'FINGERPRINTSHA256'}\n"; >+ $out .= "Fingerprint (SHA384): $opts->{'parsed'}->{'FINGERPRINTSHA384'}\n"; >+ $out .= "Fingerprint (SHA512): $opts->{'parsed'}->{'FINGERPRINTSHA512'}\n\n"; > } else { > $out = ''; > } >diff -Naur a/usr/share/tinyca/lib/GUI/WORDS.pm b/usr/share/tinyca/lib/GUI/WORDS.pm >--- a/usr/share/tinyca/lib/GUI/WORDS.pm 2015-07-13 16:53:13.505969045 +0200 >+++ b/usr/share/tinyca/lib/GUI/WORDS.pm 2015-07-13 16:52:01.389807723 +0200 >@@ -70,6 +70,9 @@ > 'STATUS' => _("Status"), > 'FINGERPRINTMD5' => _("Fingerprint (MD5)"), > 'FINGERPRINTSHA1' => _("Fingerprint (SHA1)"), >+ 'FINGERPRINTSHA256' => _("Fingerprint (SHA256)"), >+ 'FINGERPRINTSHA384' => _("Fingerprint (SHA384)"), >+ 'FINGERPRINTSHA512' => _("Fingerprint (SHA512)"), > _("Not set") => 'none', > _("Ask User") => 'user', > _("critical") => 'critical', >diff -Naur a/usr/share/tinyca/lib/GUI.pm b/usr/share/tinyca/lib/GUI.pm >--- a/usr/share/tinyca/lib/GUI.pm 2015-07-13 16:53:13.505969045 +0200 >+++ b/usr/share/tinyca/lib/GUI.pm 2015-07-13 16:52:01.390807725 +0200 >@@ -37,6 +37,9 @@ > 'ripemd160' => 'RIPEMD-160', > # 'sha' => 'SHA', > 'sha1' => 'SHA-1', >+ 'sha256' => 'SHA-256', >+ 'sha384' => 'SHA-384', >+ 'sha512' => 'SHA-512', > ); > > my %bit_lengths = ( >@@ -1060,7 +1063,7 @@ > $piter = $store->append($root); > $store->set($piter, 0 => $t); > >- for my $l (qw(FINGERPRINTMD5 FINGERPRINTSHA1)) { >+ for my $l (qw(FINGERPRINTMD5 FINGERPRINTSHA1 FINGERPRINTSHA256 FINGERPRINTSHA384 FINGERPRINTSHA512)) { > if(defined($parsed->{$l})) { > $citer = $store->append($piter); > $store->set($citer, >@@ -3091,12 +3094,12 @@ > my($previous_key, $value); > > $previous_key = undef; >- for $value (keys %values) { >+ for $value (sort keys %values) { > my $display_name = $values{$value}; > my $key = Gtk2::RadioButton->new($previous_key, $display_name); >- $key->set_active(1) if(defined($$var) && $$var eq $value); > $key->signal_connect('toggled' => > sub{GUI::CALLBACK::toggle_to_var($key, $var, $value)}); >+ $key->set_active(1) if(defined($$var) && $$var eq $value); > $radiobox->add($key); > $previous_key = $key; > } >diff -Naur a/usr/share/tinyca/lib/OpenSSL.pm b/usr/share/tinyca/lib/OpenSSL.pm >--- a/usr/share/tinyca/lib/OpenSSL.pm 2015-07-13 16:53:13.506969047 +0200 >+++ b/usr/share/tinyca/lib/OpenSSL.pm 2015-07-13 16:52:01.393807732 +0200 >@@ -669,6 +669,42 @@ > } > waitpid($pid, 0); > $ret = $? >> 8; >+ >+ $cmd = "$self->{'bin'} x509 -noout -fingerprint -sha256 -in $file"; >+ $ext = "$cmd\n\n"; >+ $pid = open3($wtfh, $rdfh, $rdfh, $cmd); >+ while(<$rdfh>){ >+ $ext .= $_; >+ ($k, $v) = split(/=/); >+ $tmp->{'FINGERPRINTSHA256'} = $v if($k =~ /SHA256 Fingerprint/i); >+ chomp($tmp->{'FINGERPRINTSHA256'}); >+ } >+ waitpid($pid, 0); >+ $ret = $? >> 8; >+ >+ $cmd = "$self->{'bin'} x509 -noout -fingerprint -sha384 -in $file"; >+ $ext = "$cmd\n\n"; >+ $pid = open3($wtfh, $rdfh, $rdfh, $cmd); >+ while(<$rdfh>){ >+ $ext .= $_; >+ ($k, $v) = split(/=/); >+ $tmp->{'FINGERPRINTSHA384'} = $v if($k =~ /SHA384 Fingerprint/i); >+ chomp($tmp->{'FINGERPRINTSHA384'}); >+ } >+ waitpid($pid, 0); >+ $ret = $? >> 8; >+ >+ $cmd = "$self->{'bin'} x509 -noout -fingerprint -sha512 -in $file"; >+ $ext = "$cmd\n\n"; >+ $pid = open3($wtfh, $rdfh, $rdfh, $cmd); >+ while(<$rdfh>){ >+ $ext .= $_; >+ ($k, $v) = split(/=/); >+ $tmp->{'FINGERPRINTSHA512'} = $v if($k =~ /SHA512 Fingerprint/i); >+ chomp($tmp->{'FINGERPRINTSHA512'}); >+ } >+ waitpid($pid, 0); >+ $ret = $? >> 8; > > if($ret) { > $t = _("Error reading fingerprint from Certificate"); >diff -Naur a/usr/share/tinyca/lib/REQ.pm b/usr/share/tinyca/lib/REQ.pm >--- a/usr/share/tinyca/lib/REQ.pm 2015-07-13 16:53:13.506969047 +0200 >+++ b/usr/share/tinyca/lib/REQ.pm 2015-07-13 16:52:01.394807734 +0200 >@@ -426,6 +426,12 @@ > $opts->{'digest'} = "md5"; > } elsif ($opts->{'digest'} =~ /^sha1/) { > $opts->{'digest'} = "sha1"; >+ } elsif ($opts->{'digest'} =~ /^sha256/) { >+ $opts->{'digest'} = "sha256"; >+ } elsif ($opts->{'digest'} =~ /^sha384/) { >+ $opts->{'digest'} = "sha384"; >+ } elsif ($opts->{'digest'} =~ /^sha512/) { >+ $opts->{'digest'} = "sha512"; > } elsif ($opts->{'digest'} =~ /^ripemd160/) { > $opts->{'digest'} = "ripemd160"; > } else {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 540622
:
406668
|
406670
|
445088
|
445094