X-Git-Url: http://www.privoxy.org/gitweb/show-status?a=blobdiff_plain;f=ssl_common.c;h=45f1e761236c2e5baf896d730640f2ed26a595d9;hb=35e52506aa63610bb3c6979d78bbd91bc006a169;hp=879111e9bc2fc47bbe4ddb858f422a480f3b01dd;hpb=ddd7b573610b81a4a088603f32433768c6c2c0a2;p=privoxy.git diff --git a/ssl_common.c b/ssl_common.c index 879111e9..45f1e761 100644 --- a/ssl_common.c +++ b/ssl_common.c @@ -290,8 +290,8 @@ extern void free_certificate_chain(struct client_state *csp) /* Cleaning buffers */ memset(csp->server_certs_chain.info_buf, 0, sizeof(csp->server_certs_chain.info_buf)); - memset(csp->server_certs_chain.file_buf, 0, - sizeof(csp->server_certs_chain.file_buf)); + freez(csp->server_certs_chain.file_buf); + csp->server_certs_chain.next = NULL; /* Freeing memory in whole linked list */ @@ -299,6 +299,11 @@ extern void free_certificate_chain(struct client_state *csp) { struct certs_chain *cert_for_free = cert; cert = cert->next; + + /* Cleaning buffers */ + memset(cert_for_free->info_buf, 0, sizeof(cert_for_free->info_buf)); + freez(cert_for_free->file_buf); + freez(cert_for_free); } } @@ -328,7 +333,7 @@ extern void ssl_send_certificate_error(struct client_state *csp) /* Header of message with certificate information */ const char message_begin[] = - "HTTP/1.1 200 OK\r\n" + "HTTP/1.1 403 Certificate validation failed\r\n" "Content-Type: text/html\r\n" "Connection: close\r\n\r\n" "\n" @@ -337,7 +342,7 @@ extern void ssl_send_certificate_error(struct client_state *csp) "
Privoxy was unable " "to securely connect to the destination server.
" "Reason: "; - const char message_end[] = "