aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r--plugins/check_tcp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 178bd568..d3c92a49 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -236,12 +236,9 @@ main (int argc, char **argv)
result = np_net_ssl_init(sd);
if (result == STATE_OK && check_cert == TRUE) {
result = np_net_ssl_check_cert(days_till_exp);
- if(result != STATE_OK) {
- printf(_("CRITICAL - Cannot retrieve server certificate.\n"));
- }
}
}
- if(result != STATE_OK){
+ if(result != STATE_OK || check_cert == TRUE){
np_net_ssl_cleanup();
if(sd) close(sd);
return result;