Skip to content

Commit

Permalink
More robust key length parsing (affects older versions of openssl bin…
Browse files Browse the repository at this point in the history
…aries).
  • Loading branch information
Brane F. Gračnar committed Jun 12, 2013
1 parent 9c17410 commit c9f7127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/P9/AA/Check/CertificateDB.pm
Expand Up @@ -401,7 +401,7 @@ sub _parse_openssl_x509 {
elsif ($l =~ m/\s+Subject:\s*(.+)/) {
$r->{subject} = $1;
}
elsif ($l =~ m/\s+Public-Key\s*:\s+\((\d+)\s+bit\)/) {
elsif ($l =~ m/\s+Public.*Key\s*:\s+\((\d+)\s+bit\)/) {
$r->{key_length} = $1;
}
}
Expand Down Expand Up @@ -434,4 +434,4 @@ L<P9::AA::Check>
=cut

1;
1;

0 comments on commit c9f7127

Please sign in to comment.