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
|
use Test::More tests => 17;
BEGIN { use_ok('Crypt::OpenSSL::X509') };
my @files = <certs/*.pem>;
foreach my $file (@files) {
if ($file eq 'certs/broken-utf8.pem') {
next;
}
ok(my $x509 = Crypt::OpenSSL::X509->new_from_file($file), 'new_from_file()');
my $san = $x509->subjectaltname;
ok ($san, 'subjectaltname call succeeded');
# Mostly for debugging but this could be commented out
foreach my $sanname (@$san) {
for (keys %$sanname){
print(" Found $_: ", $sanname->{$_}, "\n");
}
}
}
|