Package: libio-socket-ssl-perl
Version: 1.992-1
Severity: minor

IO::Socket::SSL::Utils POD says that CERT_asHash() return a hash that contains, among others:

cert_digest_xxx
       Binary digest of the certificate using the given digest
       algorithm, e.g.  cert_digest_sha256 if (the default)
       SHA-256 was used.

But there is no such key:

$ perl test-cert-ashash.pl /usr/share/ca-certificates/mozilla/EC-ACC.crt
crl_uri
ext
extkeyusage
fingerprint_sha256
issuer
keyusage
not_after
not_before
ocsp_uri
pubkey_digest_sha256
serial
subject
subjectAltNames
version
x509_digest_sha256


I guess it should be s/cert_digest/x509_digest/g.

-- System Information:
Debian Release: jessie/sid
 APT prefers unstable
 APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.14-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libio-socket-ssl-perl depends on:
ii  libnet-ssleay-perl  1.64-1
ii  netbase             5.2
ii  perl                5.18.2-4

Versions of packages libio-socket-ssl-perl recommends:
ii  libio-socket-inet6-perl     2.72-1
ii  libio-socket-ip-perl        0.29-3
ii  libnet-idn-encode-perl      2.200-1
ii  libsocket6-perl             0.25-1
ii  liburi-perl                 1.60-1
ii  perl                        5.18.2-4
ii  perl-base [libsocket-perl]  5.18.2-4

Versions of packages libio-socket-ssl-perl suggests:
ii  ca-certificates  20140325

--
Jakub Wilk
#!/usr/bin/perl
use strict;
use warnings;

use IO::Socket::SSL::Utils qw(PEM_file2cert CERT_asHash);

my $cert = PEM_file2cert($ARGV[0]);
my $hash = CERT_asHash($cert);
for (sort keys $hash) {
	print "$_\n";
}

Reply via email to