aboutsummaryrefslogtreecommitdiff
path: root/openssl/trunk/crypto/evp/evp_err.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/trunk/crypto/evp/evp_err.c')
0 files changed, 0 insertions, 0 deletions
id=35abe4ef9357c0db814fe4d9f2ba13ed9cc9fcd1'>35abe4ef
c0ccb4dc


ae410a8b
23df5f10
31b9c60f
d9f750ac
c0ccb4dc

d9f750ac
ae410a8b

8382ee8f
ae410a8b
d9f750ac
ae410a8b
d9f750ac
23df5f10


ae410a8b
23df5f10
ae410a8b
31b9c60f
23df5f10
ae410a8b

35abe4ef





ae410a8b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53




                                   

           
                   
               


                           






                                                                      


                                   
               
                            
                                                  
                                    

                                                             
                                                           

                 
                             
                   
                                                 
                   
                                               


                                                   
                                
                 
                                
                 
                                

             





                                          
 
:
# $Id$
eval 'exec perl -w -S $0 ${1+"$@"}'
    if 0;

use strict;

my $format = "DER";
my $badsia = 0;

while ($ARGV[0] =~ /^--/) {
    $_ = shift;
    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: $_");
}

while (@ARGV) {
    my $file = shift(@ARGV);
    my ($aia, $sia, $cdp, $a, $s, $c) = qw(- - -);
    next unless ($file =~ /\.cer$/);
    open(F, "-|", ( qw(openssl x509 -noout -inform), $format,
		    qw(-text -in), $file))
	or die("Couldn't run openssl x509 on $file: $!\n");
    while (<F>) {
	chomp;
	s{^.+URI:rsync://}{};
	$a = $. + 1
	    if (/Authority Information Access:/);
	$s = $. + 1
	    if (/Subject Information Access:/);
	$c = $. + 1
	    if (/X509v3 CRL Distribution Points:/);
	$aia = $_
	    if ($a && $. == $a);
	$sia = $_
	    if ($s && $. == $s);
	$cdp = $_
	    if ($c && $. == $c);
    }
    close(F);
    if ($badsia) {
	print("$file\n\t$sia\n")
	    if ($sia && $sia =~ m=[^/]$=);
    } else {
	print("$aia $sia $cdp $file\n");
    }
}