Skip to content

Commit

Permalink
Certificate checker is noisier by default; this is then overridden wh…
Browse files Browse the repository at this point in the history
…en checking the certificates for the whole of the UK federation metadata.
  • Loading branch information
iay committed Feb 18, 2009
1 parent 023a4ee commit 4589dcf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@
<exec executable="perl" dir="${xml.dir}"
input="${xml.dir}/embedded.pem">
<arg value="${build.dir}/check_embedded.pl"/>
<arg value="-q"/>
</exec>
</target>

Expand Down
22 changes: 21 additions & 1 deletion build/check_embedded.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
use Date::Parse;
use Digest::SHA1 qw(sha1 sha1_hex sha1_base64);

#
# Perform checks on a series of certificates that are to be, or have been, embedded in the
# UK federation metadata.
#
# The certificates are provided on standard input in PEM format with header lines
# indicating the entity with which they are associated.
#
# Command line options:
#
# -q quiet don't print anything out if there are no problems detected
#

#
# Load RSA key blacklists.
#
Expand Down Expand Up @@ -38,6 +50,14 @@ sub comment {
push(@olines, ' (' . $s . ')');
}

#
# Process command-line options.
#
while (@ARGV) {
$arg = shift @ARGV;
$quiet = 1 if $arg eq '-q';
}

while (<>) {

#
Expand Down Expand Up @@ -246,7 +266,7 @@ sub comment {
#
# Print any interesting things related to this certificate.
#
if ($printme) {
if ($printme || !$quiet) {
foreach $oline (@olines) {
print $oline, "\n";
}
Expand Down

0 comments on commit 4589dcf

Please sign in to comment.