From: hniksic Date: Fri, 26 Aug 2005 10:42:31 +0000 (-0700) Subject: [svn] Tell OpenSSL to renegotiate automatically (mode SSL_MODE_AUTO_RETRY). X-Git-Tag: v1.13~726 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=9aae24589097d8487a677a55caa084973ebe041e [svn] Tell OpenSSL to renegotiate automatically (mode SSL_MODE_AUTO_RETRY). By Jeremy Shapiro. --- diff --git a/src/ChangeLog b/src/ChangeLog index d6ad3dd4..f4c0e1b1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-08-26 Jeremy Shapiro + + * openssl.c (ssl_init): Set SSL_MODE_AUTO_RETRY. + 2005-08-23 Hrvoje Niksic * host.c (address_list_from_ipv4_addresses): Use IP_INADDR_DATA. diff --git a/src/http.c b/src/http.c index b83be2bb..3ef8f47b 100644 --- a/src/http.c +++ b/src/http.c @@ -1940,9 +1940,9 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) else fp = output_stream; - /* #### This confuses the timestamping code that checks for file - size. Maybe we should save some additional information? */ - if (opt.save_headers) + /* This confuses the timestamping code that checks for file size. + #### The timestamping code should be smarter about file size. */ + if (opt.save_headers && hs->restval == 0) fwrite (head, 1, strlen (head), fp); /* Now we no longer need to store the response header. */ diff --git a/src/openssl.c b/src/openssl.c index 253b903b..ea382adf 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -225,6 +225,10 @@ ssl_init () handles them correctly), allow them in OpenSSL. */ SSL_CTX_set_mode (ssl_ctx, SSL_MODE_ENABLE_PARTIAL_WRITE); + /* The OpenSSL library can handle renegotiations automatically, so + tell it to do so. */ + SSL_CTX_set_mode (ssl_ctx, SSL_MODE_AUTO_RETRY); + return true; error: