summaryrefslogtreecommitdiffstats
path: root/plugins/check_tcp.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2004-12-02 01:11:01 (GMT)
committerBenoit Mortier <opensides@users.sourceforge.net>2004-12-02 01:11:01 (GMT)
commit230d67e18ad368773f2302485d0b55f50f654e3f (patch)
tree555c1d1dd92d7897e037303bf03f86b2de0f78b9 /plugins/check_tcp.c
parent2d1ba3e36b950f05832ea2bd595616fa6cd28c28 (diff)
downloadmonitoring-plugins-230d67e18ad368773f2302485d0b55f50f654e3f.tar.gz
changed Error: by CRITICAL -
more localization fixes git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@971 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r--plugins/check_tcp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 285932d..da70c5d 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -230,7 +230,7 @@ main (int argc, char **argv)
230 } 230 }
231 else { 231 else {
232 progname = strdup ("check_tcp"); 232 progname = strdup ("check_tcp");
233 usage (_("ERROR: Generic check_tcp called with unknown service\n")); 233 usage (_("CRITICAL - Generic check_tcp called with unknown service\n"));
234 } 234 }
235 235
236 server_address = strdup ("127.0.0.1"); 236 server_address = strdup ("127.0.0.1");
@@ -239,7 +239,7 @@ main (int argc, char **argv)
239 server_quit = QUIT; 239 server_quit = QUIT;
240 status = strdup (""); 240 status = strdup ("");
241 241
242 if (process_arguments (argc, argv) == ERROR) 242 if (process_arguments (argc, argv) != OK)
243 usage (_("check_tcp: could not parse arguments\n")); 243 usage (_("check_tcp: could not parse arguments\n"));
244 244
245 /* use default expect if none listed in process_arguments() */ 245 /* use default expect if none listed in process_arguments() */
@@ -259,13 +259,13 @@ main (int argc, char **argv)
259#ifdef HAVE_SSL 259#ifdef HAVE_SSL
260 if (use_ssl && check_cert == TRUE) { 260 if (use_ssl && check_cert == TRUE) {
261 if (connect_SSL () != OK) 261 if (connect_SSL () != OK)
262 die (STATE_CRITICAL,"TCP CRITICAL - Could not make SSL connection\n"); 262 die (STATE_CRITICAL,"CRITICAL - Could not make SSL connection\n");
263 if ((server_cert = SSL_get_peer_certificate (ssl)) != NULL) { 263 if ((server_cert = SSL_get_peer_certificate (ssl)) != NULL) {
264 result = check_certificate (&server_cert); 264 result = check_certificate (&server_cert);
265 X509_free(server_cert); 265 X509_free(server_cert);
266 } 266 }
267 else { 267 else {
268 printf("ERROR: Cannot retrieve server certificate.\n"); 268 printf("CRITICAL Cannot retrieve server certificate.\n");
269 result = STATE_CRITICAL; 269 result = STATE_CRITICAL;
270 } 270 }
271 SSL_shutdown (ssl); 271 SSL_shutdown (ssl);
@@ -592,7 +592,7 @@ connect_SSL (void)
592 OpenSSL_add_all_algorithms(); 592 OpenSSL_add_all_algorithms();
593 if ((ctx = SSL_CTX_new (meth)) == NULL) 593 if ((ctx = SSL_CTX_new (meth)) == NULL)
594 { 594 {
595 printf (_("ERROR: Cannot create SSL context.\n")); 595 printf (_("CRITICAL - Cannot create SSL context.\n"));
596 return STATE_CRITICAL; 596 return STATE_CRITICAL;
597 } 597 }
598 598
@@ -615,13 +615,13 @@ connect_SSL (void)
615 if (SSL_connect(ssl) == 1) 615 if (SSL_connect(ssl) == 1)
616 return OK; 616 return OK;
617 /* ERR_print_errors_fp (stderr); */ 617 /* ERR_print_errors_fp (stderr); */
618 printf (_("ERROR: Cannot make SSL connection ")); 618 printf (_("CRITICAL - Cannot make SSL connection "));
619 ERR_print_errors_fp (stdout); 619 ERR_print_errors_fp (stdout);
620 /* printf("\n"); */ 620 /* printf("\n"); */
621 } 621 }
622 else 622 else
623 { 623 {
624 printf (_("ERROR: Cannot initiate SSL handshake.\n")); 624 printf (_("CRITICAL - Cannot initiate SSL handshake.\n"));
625 } 625 }
626 SSL_free (ssl); 626 SSL_free (ssl);
627 } 627 }
@@ -651,7 +651,7 @@ check_certificate (X509 ** certificate)
651 /* Generate tm structure to process timestamp */ 651 /* Generate tm structure to process timestamp */
652 if (tm->type == V_ASN1_UTCTIME) { 652 if (tm->type == V_ASN1_UTCTIME) {
653 if (tm->length < 10) { 653 if (tm->length < 10) {
654 printf ("ERROR: Wrong time format in certificate.\n"); 654 printf ("CRITICAL - Wrong time format in certificate.\n");
655 return STATE_CRITICAL; 655 return STATE_CRITICAL;
656 } 656 }
657 else { 657 else {
@@ -663,7 +663,7 @@ check_certificate (X509 ** certificate)
663 } 663 }
664 else { 664 else {
665 if (tm->length < 12) { 665 if (tm->length < 12) {
666 printf ("ERROR: Wrong time format in certificate.\n"); 666 printf ("CRITICAL - Wrong time format in certificate.\n");
667 return STATE_CRITICAL; 667 return STATE_CRITICAL;
668 } 668 }
669 else { 669 else {