]> git.michaelhowe.org Git - packages/n/nagios-plugins-local.git/commitdiff
Add check_cert and deal with messed-up changelog
authorMichael Howe <michael@michaelhowe.org>
Mon, 8 Jan 2018 15:28:49 +0000 (15:28 +0000)
committerMichael Howe <michael@michaelhowe.org>
Mon, 8 Jan 2018 15:28:49 +0000 (15:28 +0000)
debian/changelog
plugins/check_cert

index 1a744b341a024ec5a441f017521a367b8ef2d660..3287de56839b479c572be72a1921c30f9dd63933 100644 (file)
@@ -4,8 +4,11 @@ nagios-plugins-local (0.17) unstable; urgency=medium
     - improve various aspects:
       + list all unmonitored services, not just the first
       + exit with unknown state if can't connect to monit's web interface 
+  * check_cert
+    - fix CN-test regex (in stretch, it looks like openssl includes a space
+      for 'CN = ').
 
- -- Michael Howe <michael@michaelhowe.org>  Sat, 09 Dec 2017 22:20:59 +0000
+ -- Michael Howe <michael@michaelhowe.org>  Fri, 22 Dec 2017 23:42:09 +0000
 
 nagios-plugins-local (0.16) unstable; urgency=medium
 
index feec88b59db400ee78307bfc65fc10480603a291..824a912695fae4f4fe1f48f6d6a82401a65e71f6 100755 (executable)
@@ -224,7 +224,7 @@ sub parse_certificate {
             $result{'not_before'} = str2time($1);
         } elsif ($line =~ /^\s+Not After : (.*)$/ ){
             $result{'not_after'} = str2time($1);
-        } elsif ($line =~ /^\s+Subject:.*, CN=(.*)$/ ){
+        } elsif ($line =~ /^\s+Subject:.*, CN\s*=\s*(.*)\s*$/ ){
             $result{'cn'} = $1;
         }
     }