From 35b8045f0401e170a5dd0ddbdfe3ce637d0f704a Mon Sep 17 00:00:00 2001 From: Mathieu Cinquin Date: Fri, 17 Apr 2015 08:59:26 +0200 Subject: [PATCH] revert commit #58fb8041 --- apps/protocols/x509/mode/validity.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/protocols/x509/mode/validity.pm b/apps/protocols/x509/mode/validity.pm index 33b8797e3..d8da96fcc 100644 --- a/apps/protocols/x509/mode/validity.pm +++ b/apps/protocols/x509/mode/validity.pm @@ -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 {