revert commit #58fb8041

This commit is contained in:
Mathieu Cinquin 2015-04-17 08:59:26 +02:00
parent 6dafecd4ef
commit 35b8045f04
1 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '1.1';
$self->{version} = '1.2';
$options{options}->add_options(arguments =>
{
"hostname:s" => { name => 'hostname' },
@ -165,7 +165,7 @@ sub run {
#Subject Name
} elsif ($self->{option_results}->{validity_mode} eq 'subject') {
my $subject_name = Net::SSLeay::X509_NAME_oneline(Net::SSLeay::X509_get_subject_name($cert));
if ( $self->{option_results}->{subjectname} =~ /$subject_name/mi ) {
if ( $subject_name =~ /$self->{option_results}->{subjectname}/mi ) {
$self->{output}->output_add(severity => 'OK',
short_msg => sprintf("Subject Name %s is present in Certificate :%s", $self->{option_results}->{subjectname}, $subject_name));
} else {
@ -179,7 +179,7 @@ sub run {
#Issuer Name
} elsif ($self->{option_results}->{validity_mode} eq 'issuer') {
my $issuer_name = Net::SSLeay::X509_NAME_oneline(Net::SSLeay::X509_get_issuer_name($cert));
if ( $self->{option_results}->{issuer} =~ /$issuer_name/mi ) {
if ( $issuer_name =~ /$self->{option_results}->{issuername}/mi ) {
$self->{output}->output_add(severity => 'OK',
short_msg => sprintf("Issuer Name %s is present in Certificate :%s", $self->{option_results}->{issuername}, $issuer_name));
} else {