no failure code is set if an expiration is detected

Bug #1108791 reported by H.-Dirk Schmitt on 2013-01-29
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ssl-cert-check (Ubuntu)

Bug Description

usage is:
                ssl-cert-check -x 100 -c cert.pem

I checked it with 3 certificates:

1. valid for a long time (2 years)
2. valid only some days (30 days)
3. already expired

In every 3 cases the utility print out the right diagnosis but doesn't set an error code (<> 0).
So this utility can't be easily used from a shell script.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: ssl-cert-check 3.22-1
ProcVersionSignature: Ubuntu 3.8.0-0.3~precise3-generic 3.8.0-rc3
Uname: Linux 3.8.0-0-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
Date: Tue Jan 29 11:56:07 2013

MarkForUpload: True
PackageArchitecture: all
SourcePackage: ssl-cert-check
UpgradeStatus: No upgrade log present (probably fresh install)

Problem is in the last lines of the script:

### Exit with a success indicator
if [ "${NAGIOS}" = "TRUE" ]; then
    exit $RETCODE
    exit 0

So a workaround is to use the '-n' switch, but this gives a "ugly" message line:

FILE:/.../cert.pem Expired Jan 20 2013 |days=-9

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments