no failure code is set if an expiration is detected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ssl-cert-check (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
usage is:
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
ProcVersionSign
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
Dependencies:
MarkForUpload: True
PackageArchitec
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
else
exit 0
fi
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