Skip to content

Commit

Permalink
Handle the new format OpenSSL 1.0.0c uses for public key size.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Feb 1, 2011
1 parent 15d5d81 commit d3e0f5b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build/check_embedded.pl
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,18 @@ sub comment {
next;
}

if (/RSA Public Key: \((\d+) bit\)/) {
#
# Extract the public key size. This is displayed differently
# in different versions of OpenSSL.
#
if (/RSA Public Key: \((\d+) bit\)/) { # OpenSSL 0.9x
$pubSize = $1;
# print " Public key size: $pubSize\n";
if ($pubSize < 1024) {
error('PUBLIC KEY TOO SHORT');
}
next;
} elsif (/^\s*Public-Key: \((\d+) bit\)/) { # OpenSSL 1.0
$pubSize = $1;
# print " Public key size: $pubSize\n";
if ($pubSize < 1024) {
Expand Down

0 comments on commit d3e0f5b

Please sign in to comment.