From 3f9d30e81612896d248d3855c706efdd4d497238 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Tue, 18 Feb 2003 21:56:24 +0000 Subject: 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 --- plugins/check_http.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/check_http.c b/plugins/check_http.c index 79c5ad45..8ffbf989 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -151,7 +151,7 @@ the certificate is expired.\n" #ifdef HAVE_SSL int check_cert = FALSE; int days_till_exp; -unsigned char *randbuff; +char *randbuff = ""; SSL_CTX *ctx; SSL *ssl; X509 *server_cert; @@ -866,8 +866,11 @@ int connect_SSL (void) { SSL_METHOD *meth; - asprintf (&randbuff, "%s", "qwertyuiopasdfghjkl"); + asprintf (&randbuff, "%s", "qwertyuiopasdfghjklqwertyuiopasdfghjkl"); RAND_seed (randbuff, strlen (randbuff)); + if (verbose) + printf("SSL seeding: %s\n", (RAND_status()==1 ? "OK" : "Failed") ); + /* Initialize SSL context */ SSLeay_add_ssl_algorithms (); meth = SSLv23_client_method (); -- cgit v1.2.3