Skip to content

Commit

Permalink
Look for dodgy public exponent values.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Mar 16, 2012
1 parent 316e733 commit 6278eb1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build/check_authorities.pl
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@
}
}

#
# Look for reasonable public exponent values.
#
if (/Exponent: (\d+)/) {
$exponent = $1;
# print " exponent: $exponent\n";
if (($exponent & 1) == 0) {
error("RSA public exponent $exponent is even");
} elsif ($exponent <= 3) {
error("insecure RSA public exponent $exponent");
} elsif ($exponent < 65537) {
warning("small RSA public exponent $exponent")
}
}

}
close SSL;
#print " text lines: $#lines\n";
Expand Down

0 comments on commit 6278eb1

Please sign in to comment.