diff options
Diffstat (limited to 'plugins/sslutils.c')
-rw-r--r-- | plugins/sslutils.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/sslutils.c b/plugins/sslutils.c index 66c7299..09d58b0 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c | |||
@@ -47,7 +47,7 @@ int np_net_ssl_init (int sd){ | |||
47 | SSL_load_error_strings (); | 47 | SSL_load_error_strings (); |
48 | OpenSSL_add_all_algorithms(); | 48 | OpenSSL_add_all_algorithms(); |
49 | if ((c = SSL_CTX_new (m)) == NULL) { | 49 | if ((c = SSL_CTX_new (m)) == NULL) { |
50 | printf (_("CRITICAL - Cannot create SSL context.\n")); | 50 | printf ("%s\n", _("CRITICAL - Cannot create SSL context.")); |
51 | return STATE_CRITICAL; | 51 | return STATE_CRITICAL; |
52 | } | 52 | } |
53 | if ((s = SSL_new (c)) != NULL){ | 53 | if ((s = SSL_new (c)) != NULL){ |
@@ -55,13 +55,13 @@ int np_net_ssl_init (int sd){ | |||
55 | if (SSL_connect(s) == 1){ | 55 | if (SSL_connect(s) == 1){ |
56 | return OK; | 56 | return OK; |
57 | } else { | 57 | } else { |
58 | printf (_("CRITICAL - Cannot make SSL connection ")); | 58 | printf ("%s\n", _("CRITICAL - Cannot make SSL connection ")); |
59 | # ifdef USE_OPENSSL /* XXX look into ERR_error_string */ | 59 | # ifdef USE_OPENSSL /* XXX look into ERR_error_string */ |
60 | ERR_print_errors_fp (stdout); | 60 | ERR_print_errors_fp (stdout); |
61 | # endif /* USE_OPENSSL */ | 61 | # endif /* USE_OPENSSL */ |
62 | } | 62 | } |
63 | } else { | 63 | } else { |
64 | printf (_("CRITICAL - Cannot initiate SSL handshake.\n")); | 64 | printf ("%s\n", _("CRITICAL - Cannot initiate SSL handshake.")); |
65 | } | 65 | } |
66 | return STATE_CRITICAL; | 66 | return STATE_CRITICAL; |
67 | } | 67 | } |
@@ -93,7 +93,7 @@ int np_net_ssl_check_cert(int days_till_exp){ | |||
93 | 93 | ||
94 | certificate=SSL_get_peer_certificate(s); | 94 | certificate=SSL_get_peer_certificate(s); |
95 | if(! certificate){ | 95 | if(! certificate){ |
96 | printf (_("CRITICAL - Cannot retrieve server certificate.\n")); | 96 | printf ("%s\n",_("CRITICAL - Cannot retrieve server certificate.")); |
97 | return STATE_CRITICAL; | 97 | return STATE_CRITICAL; |
98 | } | 98 | } |
99 | 99 | ||
@@ -103,7 +103,7 @@ int np_net_ssl_check_cert(int days_till_exp){ | |||
103 | /* Generate tm structure to process timestamp */ | 103 | /* Generate tm structure to process timestamp */ |
104 | if (tm->type == V_ASN1_UTCTIME) { | 104 | if (tm->type == V_ASN1_UTCTIME) { |
105 | if (tm->length < 10) { | 105 | if (tm->length < 10) { |
106 | printf (_("CRITICAL - Wrong time format in certificate.\n")); | 106 | printf ("%s\n", _("CRITICAL - Wrong time format in certificate.")); |
107 | return STATE_CRITICAL; | 107 | return STATE_CRITICAL; |
108 | } else { | 108 | } else { |
109 | stamp.tm_year = (tm->data[0] - '0') * 10 + (tm->data[1] - '0'); | 109 | stamp.tm_year = (tm->data[0] - '0') * 10 + (tm->data[1] - '0'); |
@@ -113,7 +113,7 @@ int np_net_ssl_check_cert(int days_till_exp){ | |||
113 | } | 113 | } |
114 | } else { | 114 | } else { |
115 | if (tm->length < 12) { | 115 | if (tm->length < 12) { |
116 | printf (_("CRITICAL - Wrong time format in certificate.\n")); | 116 | printf ("%s\n", _("CRITICAL - Wrong time format in certificate.")); |
117 | return STATE_CRITICAL; | 117 | return STATE_CRITICAL; |
118 | } else { | 118 | } else { |
119 | stamp.tm_year = | 119 | stamp.tm_year = |
@@ -155,7 +155,7 @@ int np_net_ssl_check_cert(int days_till_exp){ | |||
155 | X509_free (certificate); | 155 | X509_free (certificate); |
156 | return STATE_OK; | 156 | return STATE_OK; |
157 | # else /* ifndef USE_OPENSSL */ | 157 | # else /* ifndef USE_OPENSSL */ |
158 | printf (_("WARNING - Plugin does not support checking certificates.\n")); | 158 | printf ("%s\n", _("WARNING - Plugin does not support checking certificates.")); |
159 | return STATE_WARNING; | 159 | return STATE_WARNING; |
160 | # endif /* USE_OPENSSL */ | 160 | # endif /* USE_OPENSSL */ |
161 | } | 161 | } |