aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/uri.pl18
1 files changed, 14 insertions, 4 deletions
diff --git a/scripts/uri.pl b/scripts/uri.pl
index 73389964..cd029fec 100644
--- a/scripts/uri.pl
+++ b/scripts/uri.pl
@@ -6,12 +6,17 @@ eval 'exec perl -w -S $0 ${1+"$@"}'
use strict;
my $format = "DER";
+my $badsia = 0;
while ($ARGV[0] =~ /^--/) {
$_ = shift;
- if (/^--der/) { $format = "DER"; next }
- if (/^--pem/) { $format = "PEM"; next }
- if (/^--help/) { print("$0 [ --der | --pem ] cert [ cert ...]\n"); exit }
+ if (/^--der/) { $format = "DER"; next }
+ if (/^--pem/) { $format = "PEM"; next }
+ if (/^--badsia/) { $badsia = 1; next }
+ if (/^--help/) {
+ print("$0 [ --der | --pem ] [ --badsia ] cert [ cert ...]\n");
+ exit;
+ }
die("Unrecognized option: $_");
}
@@ -39,5 +44,10 @@ while (@ARGV) {
if ($c && $. == $c);
}
close(F);
- print("$aia $sia $cdp $file\n");
+ if ($badsia) {
+ print("$file\n\t$sia\n")
+ if ($sia && $sia =~ m=[^/]$=);
+ } else {
+ print("$aia $sia $cdp $file\n");
+ }
}