diff options
author | Rob Austein <sra@hactrn.net> | 2006-09-18 19:34:25 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2006-09-18 19:34:25 +0000 |
commit | 9e3dbf2103d03def0d2e777aeeeaae73c6214fe6 (patch) | |
tree | 82528a96ea5215a0af542051dcd859ced2e43cd9 /scripts/rcynic-prototype.pl | |
parent | c0ccb4dc105078f09ddab79a4a29918dcf9dbcbb (diff) |
At some point we're going to want to reject broken SIAs rather than
fixing them.
svn path=/scripts/rcynic-prototype.pl; revision=285
Diffstat (limited to 'scripts/rcynic-prototype.pl')
-rw-r--r-- | scripts/rcynic-prototype.pl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/rcynic-prototype.pl b/scripts/rcynic-prototype.pl index 7a435043..2c95a454 100644 --- a/scripts/rcynic-prototype.pl +++ b/scripts/rcynic-prototype.pl @@ -34,6 +34,7 @@ my $verbose_sia_fixup = 0; # Log when fixing up SIA URIs my $disable_network = 0; # Return immediate failure for all rsync commands my $retain_old_certs = 1; # Retain old valid certificates from previous runs +my $fix_broken_sia = 1; # Fix broken SIA URIs sub logmsg { my @t = gmtime; @@ -153,9 +154,15 @@ sub parse_cert { # Parse interesting fields from a certificate if (/X509v3 Basic Constraints/ && $txt[$i+1] =~ /^\s*CA:TRUE\s*$/); } if ($res{sia} && $res{sia} !~ m=/$=) { - logmsg("Badly formatted SIA URI, compensating: $res{sia}") - if ($verbose_sia_fixup); - $res{sia} .= "/"; + if ($fix_broken_sia) { + logmsg("Badly formatted SIA URI, compensating: $res{sia}") + if ($verbose_sia_fixup); + $res{sia} .= "/"; + } else { + logmsg("Badly formatted SIA URI, deleting: $res{sia}") + if ($verbose_sia_fixup); + delete($res{sia}); + } } return $parse_cache{$file} = \%res; } |