X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=openssl.c;h=6cc2af55b5a99a46270a734853598e020fd44ae5;hp=a2d8853baaebce3243cce92e982f3bb220038b9b;hb=1a70173d7f1e3ac1e9bf678bd602537a06e0f406;hpb=80685cac02eeff1aec436a033d3e5e6721942f80 diff --git a/openssl.c b/openssl.c index a2d8853b..6cc2af55 100644 --- a/openssl.c +++ b/openssl.c @@ -1,6 +1,6 @@ /********************************************************************* * - * File : $Source: $ + * File : $Source: /cvsroot/ijbswa/current/openssl.c,v $ * * Purpose : File with TLS/SSL extension. Contains methods for * creating, using and closing TLS/SSL connections. @@ -171,7 +171,7 @@ extern int ssl_send_data(struct ssl_attr *ssl_attr, const unsigned char *buf, si */ while ((ret = BIO_write(bio, (const unsigned char *)(buf + pos), - send_len)) < 0) + send_len)) <= 0) { if (!BIO_should_retry(bio)) { @@ -416,7 +416,7 @@ static int ssl_store_cert(struct client_state *csp, X509* crt) if (BIO_puts(bio, "\nsubject name : ") <= 0) { - log_ssl_errors(LOG_LEVEL_ERROR, "BIO_puts() for sublect failed"); + log_ssl_errors(LOG_LEVEL_ERROR, "BIO_puts() for subject failed"); ret = -1; goto exit; } @@ -821,7 +821,8 @@ extern int create_client_ssl_connection(struct client_state *csp) csp->http->hash_of_host_hex); if (BIO_do_handshake(ssl_attr->openssl_attr.bio) != 1) { - log_ssl_errors(LOG_LEVEL_ERROR, "BIO_do_handshake failed"); + log_ssl_errors(LOG_LEVEL_ERROR, + "The TLS/SSL handshake with the client failed"); ret = -1; goto exit; } @@ -1054,7 +1055,8 @@ extern int create_server_ssl_connection(struct client_state *csp) if (BIO_do_handshake(ssl_attrs->bio) != 1) { - log_ssl_errors(LOG_LEVEL_ERROR, "BIO_do_handshake failed"); + log_ssl_errors(LOG_LEVEL_ERROR, + "The TLS/SSL handshake with the server failed"); ret = -1; goto exit; } @@ -1170,11 +1172,11 @@ static void log_ssl_errors(int debuglevel, const char* fmt, ...) va_end(args); /* * In case if called by mistake and there were - * no SSL errors let's report it to the log. + * no TLS/SSL errors let's report it to the log. */ if (!reported) { - log_error(debuglevel, "%s: no ssl errors detected", prefix); + log_error(debuglevel, "%s: no TLS/SSL errors detected", prefix); } }