X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=ssl.c;h=ccc1b105547b23ddcacb2774917dd2fdc7fc26ce;hp=2f6dc51e3777f64189d8a86c1826117abd2be8e1;hb=500d7c85445b001256f29c0cff5c453c86afb81c;hpb=14f7edff7951eb3e664baed36a4b4b5c666a1937;ds=sidebyside diff --git a/ssl.c b/ssl.c index 2f6dc51e..ccc1b105 100644 --- a/ssl.c +++ b/ssl.c @@ -6,7 +6,7 @@ * creating, using and closing TLS/SSL connections. * * Copyright : Written by and Copyright (c) 2017 Vaclav Svec. FIT CVUT. - * Copyright (C) 2018-2019 by Fabian Keil + * Copyright (C) 2018-2020 by Fabian Keil * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -229,6 +229,8 @@ extern int ssl_send_data(mbedtls_ssl_context *ssl, const unsigned char *buf, siz send_len = (int)max_fragment_size; } + log_error(LOG_LEVEL_WRITING, "TLS: %N", send_len, buf+pos); + /* * Sending one part of the buffer */ @@ -302,6 +304,8 @@ extern int ssl_recv_data(mbedtls_ssl_context *ssl, unsigned char *buf, size_t ma return -1; } + log_error(LOG_LEVEL_RECEIVED, "TLS: %N", ret, buf); + return ret; } @@ -798,7 +802,7 @@ extern int create_server_ssl_connection(struct client_state *csp) * Handshake with server */ log_error(LOG_LEVEL_CONNECT, - "Performing the TLS/SSL handshake with server"); + "Performing the TLS/SSL handshake with the server"); while ((ret = mbedtls_ssl_handshake(&(csp->mbedtls_server_attr.ssl))) != 0) { @@ -1542,7 +1546,7 @@ exit: * * Function : make_certs_path * - * Description : Creates path to file from three pieces. This fuction + * Description : Creates path to file from three pieces. This function * takes parameters and puts them in one new mallocated * char * in correct order. Returned variable must be freed * by caller. This function is mainly used for creating