ssl_ctx = SSL_CTX_new(SSLv23_server_method()) instead of using a temporary variable...
[citadel.git] / citadel / modules / crypto / serv_crypto.c
index 302be080e427ec3d00c5e1653daeba6aa89c6674..cbb190cde857e987a76c0b3a87a22622aec3ec9b 100644 (file)
@@ -133,7 +133,6 @@ void update_key_and_cert_if_needed(void) {
 
 
 void init_ssl(void) {
-       const SSL_METHOD *ssl_method;
        RSA *rsa = NULL;
        X509_REQ *req = NULL;
        X509 *cer = NULL;
@@ -145,8 +144,7 @@ void init_ssl(void) {
        // Initialize SSL transport layer
        SSL_library_init();
        SSL_load_error_strings();
-       ssl_method = SSLv23_server_method();
-       if (!(ssl_ctx = SSL_CTX_new(ssl_method))) {
+       if (!(ssl_ctx = SSL_CTX_new(SSLv23_server_method()))) {
                syslog(LOG_ERR, "crypto: SSL_CTX_new failed: %s", ERR_reason_error_string(ERR_get_error()));
                return;
        }