From e232330200eed7ec5d8cbec6279cd82dc7b274d3 Mon Sep 17 00:00:00 2001 From: Matteo Corti Date: Tue, 10 Sep 2024 18:43:45 +0200 Subject: [PATCH] Fixes #516 --- CITATION.cff | 4 ++-- ChangeLog | 4 ++++ NEWS.md | 2 ++ RELEASE_NOTES.md | 2 +- VERSION | 2 +- check_ssl_cert | 8 ++++++-- check_ssl_cert.1 | 2 +- check_ssl_cert.spec | 5 ++++- 8 files changed, 21 insertions(+), 8 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index b4555f9..1346414 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -266,8 +266,8 @@ authors: given-names: "Дилян" website: https://github.com/dilyanpalauzov title: "check_ssl_cert" -version: 2.83.0 -date-released: 2024-08-15 +version: 2.83.1 +date-released: 2024-09-10 url: "https://github.com/matteocorti/check_ssl_cert" repository-code: "https://github.com/matteocorti/check_ssl_cert" keywords: diff --git a/ChangeLog b/ChangeLog index 1786d73..fb40cca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2024-09-10 Matteo Corti + + * check_ssl_cert (check_option_argument): fixed a problem with | in the output + 2024-07-11 Matteo Corti * check_ssl_cert (main): fetch HTTP headers for --debug-headers even if no header check is enabled diff --git a/NEWS.md b/NEWS.md index 889f42a..79b5f45 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # News +* 2024-09-10 Version 2.83.1 + * Fixes the output of missing arguments on Nagios * 2024-08-15 Version 2.83.0 * Shows ```--info``` event in case of a problem * 2024-07-11, Version 2.82.0 diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 6bdd48f..c6dda8f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1 +1 @@ -Shows ```--info``` event in case of a problem +Fixes the output of missing arguments on Nagios diff --git a/VERSION b/VERSION index 9d1971d..3478b1d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.83.0 +2.83.1 diff --git a/check_ssl_cert b/check_ssl_cert index 47304bb..387ba32 100755 --- a/check_ssl_cert +++ b/check_ssl_cert @@ -26,7 +26,7 @@ ################################################################################ # Constants -VERSION=2.83.0 +VERSION=2.83.1 SHORTNAME="SSL_CERT" VALID_ATTRIBUTES=",startdate,enddate,subject,issuer,modulus,serial,hash,email,ocsp_uri,fingerprint," @@ -3086,9 +3086,13 @@ ascii_grep() { # $2 next command line parameter check_option_argument() { + # the majority of the options is specided as '-s|--long' + # but | is a problem for Nagios: we substitute it with ', ' + option=$( echo "${1}" | sed 's/|/, /' ) + # shellcheck disable=SC2295 if [ -z "$2" ] || [ "${2%${2#?}}"x = '-x' ]; then - unknown "'${1}' requires an argument" + unknown "'${option}' requires an argument" fi } diff --git a/check_ssl_cert.1 b/check_ssl_cert.1 index f7136a6..09a3747 100644 --- a/check_ssl_cert.1 +++ b/check_ssl_cert.1 @@ -1,7 +1,7 @@ .\" Process this file with .\" groff -man -Tascii check_ssl_cert.1 .\" -.TH "check_ssl_cert" 1 "August, 2024" "2.83.0" "USER COMMANDS" +.TH "check_ssl_cert" 1 "September, 2024" "2.83.1" "USER COMMANDS" .SH NAME check_ssl_cert \- checks the validity of X.509 certificates .SH SYNOPSIS diff --git a/check_ssl_cert.spec b/check_ssl_cert.spec index 4045472..f5af671 100644 --- a/check_ssl_cert.spec +++ b/check_ssl_cert.spec @@ -1,4 +1,4 @@ -%global version 2.83.0 +%global version 2.83.1 %global release 0 %global sourcename check_ssl_cert %global packagename nagios-plugins-check_ssl_cert @@ -54,6 +54,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue September 10 2024 Matteo Corti - 2.83.1-0 +- Updated to 2.83.1 + * Tue August 28 2024 Matteo Corti - 2.83.0-0 - Updated to 2.83.0