serve(): Increase the chances that the host is logged
[privoxy.git] / openssl.c
index 8239e33..c4783fb 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;
@@ -869,7 +869,9 @@ extern int create_client_ssl_connection(struct client_state *csp)
        goto exit;
    }
 
-   log_error(LOG_LEVEL_CONNECT, "Client successfully connected over TLS/SSL");
+   log_error(LOG_LEVEL_CONNECT, "Client successfully connected over %s (%s).",
+      SSL_get_version(ssl), SSL_get_cipher_name(ssl));
+
    csp->ssl_with_client_is_opened = 1;
    ret = 0;
 
@@ -1179,7 +1181,8 @@ extern int create_server_ssl_connection(struct client_state *csp)
       }
    }
 
-   log_error(LOG_LEVEL_CONNECT, "Server successfully connected over TLS/SSL");
+   log_error(LOG_LEVEL_CONNECT, "Server successfully connected over %s (%s).",
+     SSL_get_version(ssl), SSL_get_cipher_name(ssl));
 
    /*
     * Server certificate chain is valid, so we can clean