From 2aaa2da4cc4e5363d24c49a930b467f96a348ee7 Mon Sep 17 00:00:00 2001 From: Shini31 Date: Tue, 12 Jan 2016 15:15:28 +0100 Subject: [PATCH] add alternative subject names in long output --- apps/protocols/x509/mode/validity.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/protocols/x509/mode/validity.pm b/apps/protocols/x509/mode/validity.pm index d1a381fd0..fd3384e89 100644 --- a/apps/protocols/x509/mode/validity.pm +++ b/apps/protocols/x509/mode/validity.pm @@ -153,7 +153,11 @@ sub run { foreach my $subject_name (@subject_name) { if ($subject_name =~ /$self->{option_results}->{subjectname}/mi) { $subject_altname = $subject_name; - next; + } else { + if ($subject_name =~/[\w\-]+(\.[\w\-]+)*\.\w+/) { + $subject_altname = $subject_name; + $self->{output}->output_add(long_msg => sprintf("Subject Name '%s' is also present in Certificate", $subject_altname)); + } } }