From df494ade428ddb4cb6a9a6f8b3885cf1b2478f06 Mon Sep 17 00:00:00 2001 From: mrcsys Date: Wed, 18 Jan 2006 14:53:13 +0000 Subject: Added start_ssl function to initialize library. --- nanohttp/nanohttp-ssl.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'nanohttp/nanohttp-ssl.c') diff --git a/nanohttp/nanohttp-ssl.c b/nanohttp/nanohttp-ssl.c index 254b718..a2cdf17 100644 --- a/nanohttp/nanohttp-ssl.c +++ b/nanohttp/nanohttp-ssl.c @@ -166,22 +166,24 @@ user_verify (X509 * cert) } #endif -SSL_CTX * -initialize_ctx (const char *keyfile, const char *password, const char *calist) -{ - SSL_CTX *ctx = NULL; - - if (password == NULL) - password = ""; - - +void +start_ssl( void ){ /* Global system initialization */ log_verbose1 ("Initializing library"); SSL_library_init (); SSL_load_error_strings (); ERR_load_crypto_strings (); OpenSSL_add_ssl_algorithms (); +} +SSL_CTX * +initialize_ctx (const char *keyfile, const char *password, const char *calist) +{ + SSL_CTX *ctx = NULL; + + if (password == NULL) + password = ""; + /* Create our context */ ctx = SSL_CTX_new (SSLv23_method ()); -- cgit v1.1-32-gdbae