OpenSSL ssl_store_cert(): Fix two error messages
[privoxy.git] / openssl.c
index 15166da..2ab67c9 100644 (file)
--- a/openssl.c
+++ b/openssl.c
@@ -283,7 +283,7 @@ static int ssl_store_cert(struct client_state *csp, X509* crt)
 
    if (!bio)
    {
-      log_ssl_errors(LOG_LEVEL_ERROR, "BIO_new_mem_buf() failed");
+      log_ssl_errors(LOG_LEVEL_ERROR, "BIO_new() failed");
       return -1;
    }
 
@@ -328,7 +328,7 @@ static int ssl_store_cert(struct client_state *csp, X509* crt)
    bio = BIO_new(BIO_s_mem());
    if (!bio)
    {
-      log_ssl_errors(LOG_LEVEL_ERROR, "BIO_new_mem_buf() failed");
+      log_ssl_errors(LOG_LEVEL_ERROR, "BIO_new() failed");
       ret = -1;
       goto exit;
    }
@@ -656,7 +656,7 @@ static int ssl_store_cert(struct client_state *csp, X509* crt)
    len = BIO_get_mem_data(bio, &bio_mem_data);
    if (len <= 0)
    {
-      log_error(LOG_LEVEL_ERROR, "BIO_get_mem_data() returned %d "
+      log_error(LOG_LEVEL_ERROR, "BIO_get_mem_data() returned %ld "
          "while gathering certificate information", len);
       ret = -1;
       goto exit;
@@ -2221,6 +2221,7 @@ extern void ssl_crt_verify_info(char *buf, size_t size, struct client_state *csp
 }
 
 
+#ifdef FEATURE_GRACEFUL_TERMINATION
 /*********************************************************************
  *
  * Function    :  ssl_release
@@ -2236,8 +2237,12 @@ extern void ssl_release(void)
 {
    if (ssl_inited == 1)
    {
+#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
+#ifndef LIBRESSL_VERSION_NUMBER
 #ifndef OPENSSL_NO_COMP
       SSL_COMP_free_compression_methods();
+#endif
+#endif
 #endif
       CONF_modules_free();
       CONF_modules_unload(1);
@@ -2251,4 +2256,4 @@ extern void ssl_release(void)
       CRYPTO_cleanup_all_ex_data();
    }
 }
-
+#endif /* def FEATURE_GRACEFUL_TERMINATION */