diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-02-18 21:56:24 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-02-18 21:56:24 (GMT) |
commit | 3f9d30e81612896d248d3855c706efdd4d497238 (patch) | |
tree | 43581045b430812d33d40cffffe7fd59366b7068 /plugins/check_http.c | |
parent | d854505371f42b69f7e5dc495911dfaf1c09f87d (diff) | |
download | monitoring-plugins-3f9d30e81612896d248d3855c706efdd4d497238.tar.gz |
Fixed compiler warning and increased the SSL random key for a Solaris PRNG problem
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@338 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r-- | plugins/check_http.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index 79c5ad4..8ffbf98 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -151,7 +151,7 @@ the certificate is expired.\n" | |||
151 | #ifdef HAVE_SSL | 151 | #ifdef HAVE_SSL |
152 | int check_cert = FALSE; | 152 | int check_cert = FALSE; |
153 | int days_till_exp; | 153 | int days_till_exp; |
154 | unsigned char *randbuff; | 154 | char *randbuff = ""; |
155 | SSL_CTX *ctx; | 155 | SSL_CTX *ctx; |
156 | SSL *ssl; | 156 | SSL *ssl; |
157 | X509 *server_cert; | 157 | X509 *server_cert; |
@@ -866,8 +866,11 @@ int connect_SSL (void) | |||
866 | { | 866 | { |
867 | SSL_METHOD *meth; | 867 | SSL_METHOD *meth; |
868 | 868 | ||
869 | asprintf (&randbuff, "%s", "qwertyuiopasdfghjkl"); | 869 | asprintf (&randbuff, "%s", "qwertyuiopasdfghjklqwertyuiopasdfghjkl"); |
870 | RAND_seed (randbuff, strlen (randbuff)); | 870 | RAND_seed (randbuff, strlen (randbuff)); |
871 | if (verbose) | ||
872 | printf("SSL seeding: %s\n", (RAND_status()==1 ? "OK" : "Failed") ); | ||
873 | |||
871 | /* Initialize SSL context */ | 874 | /* Initialize SSL context */ |
872 | SSLeay_add_ssl_algorithms (); | 875 | SSLeay_add_ssl_algorithms (); |
873 | meth = SSLv23_client_method (); | 876 | meth = SSLv23_client_method (); |