check_cert.pl
changeset 21 aeb27519c473
parent 20 a68b32758059
child 26 c2489ec5a726
equal deleted inserted replaced
20:a68b32758059 21:aeb27519c473
    19 
    19 
    20 $opt_w = "1month";
    20 $opt_w = "1month";
    21 $opt_c = "1week";
    21 $opt_c = "1week";
    22 $opt_b = "/usr/bin/openssl";
    22 $opt_b = "/usr/bin/openssl";
    23 $opt_s = "md5WithRSAEncryption";
    23 $opt_s = "md5WithRSAEncryption";
       
    24 
       
    25 my $revision = '1.2.2';
    24 
    26 
    25 Getopt::Long::Configure('bundling');
    27 Getopt::Long::Configure('bundling');
    26 GetOptions(
    28 GetOptions(
    27     "V"           => \$opt_V,
    29     "V"           => \$opt_V,
    28     "version"     => \$opt_V,
    30     "version"     => \$opt_V,
    39     "f=s"         => \@opt_certfiles,
    41     "f=s"         => \@opt_certfiles,
    40     "certfile=s"  => \@opt_certfiles
    42     "certfile=s"  => \@opt_certfiles
    41 );
    43 );
    42 
    44 
    43 if ($opt_V) {
    45 if ($opt_V) {
    44     print_revision( $ME, "1.2" );
    46     print_revision( $ME, $revision );
    45     exit $ERRORS{"OK"};
    47     exit $ERRORS{"OK"};
    46 }
    48 }
    47 
    49 
    48 if ($opt_h) {
    50 if ($opt_h) {
    49     print_help();
    51     print_help();
   205     print "  $ME [-h | --help]\n";
   207     print "  $ME [-h | --help]\n";
   206     print "  $ME [-V | --version]\n";
   208     print "  $ME [-V | --version]\n";
   207 }
   209 }
   208 
   210 
   209 sub print_help() {
   211 sub print_help() {
   210     print_revision( $ME, "1.2" );
   212     print_revision( $ME, $revision );
   211     print "Copyright (c) 2010 Christian Arnold\n\n";
   213     print "Copyright (c) 2010 Christian Arnold\n";
       
   214     print "Copyright (c) 2019 Matthias Förste\n\n";
   212     print "This plugin checks the expire date for openssl certificates.\n\n";
   215     print "This plugin checks the expire date for openssl certificates.\n\n";
   213     print_usage();
   216     print_usage();
   214     print "\n";
   217     print "\n";
   215     print "  -b, --binary <binary>\n";
   218     print "  -b, --binary <binary>\n";
   216     print "     Path of openssl binary (default: /usr/bin/openssl)\n";
   219     print "     Path of openssl binary (default: /usr/bin/openssl)\n";