]> sjero.net Git - wget/blobdiff - src/gen_sslfunc.c
[svn] Commit IPv6 support by Thomas Lussnig.
[wget] / src / gen_sslfunc.c
index 1f97edcc38b315c083bb8fde959b7e450dee302f..da84492d5fdb968bac917375af55dd1d52f6181c 100644 (file)
@@ -125,7 +125,8 @@ init_ssl (SSL_CTX **ctx)
   meth = SSLv23_client_method ();
   *ctx = SSL_CTX_new (meth);
   SSL_CTX_set_verify (*ctx, verify, verify_callback);
-  if (*ctx == NULL) return SSLERRCTXCREATE;
+  if (*ctx == NULL) 
+    return SSLERRCTXCREATE;
   if (opt.sslcertfile)
     {
       if (SSL_CTX_use_certificate_file (*ctx, opt.sslcertfile,
@@ -221,9 +222,8 @@ ssl_iread (SSL *con, char *buf, int len)
   do
     {
 #ifdef HAVE_SELECT
-      if (opt.timeout)
+      if (opt.timeout && !SSL_pending (con))
        {
-         
          do
            {
              res = select_fd (fd, opt.timeout, 0);