gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] branch master updated (486ada36f -> 71b588320)


From: gnunet
Subject: [gnurl] branch master updated (486ada36f -> 71b588320)
Date: Fri, 20 Dec 2019 14:49:02 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a change to branch master
in repository gnurl.

    from 486ada36f make gnurl
     new 4ec4787a1 HISTORY: the SMB(S) support landed in 2014
     new 9973dabeb test1270: a basic -w redirect_url test
     new 14f8b6e69 CURLOPT_URL.3: "curl supports SMB version 1 (only)"
     new f098c9e6f curl/parseconfig: fix mem-leak
     new 23e4d98e7 curl/parseconfig: use curl_free() to free memory allocated 
by libcurl
     new ac7b1fb10 strerror: Fix compiler warning "empty expression"
     new c1592cc92 CURLOPT_QUOTE.3: fix typos
     new fba830133 test1456: remove the use of a fixed local port
     new 8c0807aa1 create_conn: prefer multiplexing to using new connections
     new e9685cd75 curl.h: add two defines for the "pre ISO C" case
     new 23208e330 test165: set LC_ALL=en_US.UTF-8 too
     new b4c998238 tests: set LC_ALL in more tests
     new 25b69c482 sws: search for "Testno:" header uncondtionally if no testno
     new 10121a417 ngtcp2: Support the latest update key callback type
     new 2eb7dc056 RELEASE-NOTES: synced
     new a90d76354 HISTORY: OSS-Fuzz started fuzzing libcurl in 2017
     new 525787269 examples/url2file.c: corrected a comment
     new 71b588320 Merge branch 'master' of https://github.com/curl/curl

The 18 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 RELEASE-NOTES                          | 71 +++++++++++++++++++++++++++-------
 docs/HISTORY.md                        |  4 ++
 docs/examples/url2file.c               |  2 +-
 docs/libcurl/opts/GNURLOPT_POSTQUOTE.3 |  8 ++--
 docs/libcurl/opts/GNURLOPT_PREQUOTE.3  |  6 +--
 docs/libcurl/opts/GNURLOPT_QUOTE.3     |  8 ++--
 docs/libcurl/opts/GNURLOPT_URL.3       |  4 +-
 include/gnurl/curl.h                   |  2 +
 lib/strerror.c                         |  2 +-
 lib/url.c                              | 18 ---------
 lib/vquic/ngtcp2.c                     | 31 +--------------
 lib/vquic/ngtcp2.h                     |  3 --
 src/tool_parsecfg.c                    |  4 +-
 tests/data/Makefile.inc                |  2 +-
 tests/data/test1270                    | 69 +++++++++++++++++++++++++++++++++
 tests/data/test1448                    |  2 +-
 tests/data/test1455                    |  3 +-
 tests/data/test1456                    | 10 ++++-
 tests/data/test165                     |  2 +-
 tests/data/test2046                    |  2 +-
 tests/data/test2047                    |  2 +-
 tests/server/sws.c                     | 40 +++++++++++--------
 22 files changed, 190 insertions(+), 105 deletions(-)
 create mode 100644 tests/data/test1270

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 371482c1b..73eb12c1d 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -20,16 +20,21 @@ This release includes the following bugfixes:
  o Azure Pipelines: add several builds
  o CMake: add support for building with the NSS vtls backend [43]
  o CURL-DISABLE: initial docs for the CURL_DISABLE_* defines [19]
+ o CURLOPT_QUOTE.3: fix typos [78]
+ o CURLOPT_URL.3: "curl supports SMB version 1 (only)"
  o CURLOPT_VERBOSE.3: see also ERRORBUFFER
  o HISTORY: added cmake, HTTP/3 and parallel downloads with curl
+ o HISTORY: the SMB(S) support landed in 2014
  o INSTALL.md: provide Android build instructions [10]
+ o KNOWN_BUGS: Connection information when using TCP Fast Open [85]
+ o KNOWN_BUGS: LDAP on Windows doesn't work correctly [86]
+ o KNOWN_BUGS: TLS session cache doesn't work with TFO [56]
  o OPENSOCKETFUNCTION.3: correct the purpose description [48]
  o altsvc: bump to h3-24 [6]
  o altsvc: make the save function ignore NULL filenames [67]
  o build: Disable Visual Studio warning "conditional expression is constant" 
[49]
  o build: fix for CURL_DISABLE_DOH [2]
  o checksrc.bat: Add a check for vquic and vssh directories [40]
- o checksrc: fix regexp for ASSIGNWITHINCONDITION [56]
  o checksrc: repair the copyrightyear check [25]
  o cirrus-ci: enable clang sanitizers on freebsd 13 [60]
  o cirrus: Drop the FreeBSD 10.4 build
@@ -40,12 +45,18 @@ This release includes the following bugfixes:
  o conncache: CONNECT_ONLY connections assumed always in-use [71]
  o conncache: fix multi-thread use of shared connection cache [61]
  o copyrights: fix copyright year range [25]
+ o create_conn: prefer multiplexing to using new connections [76]
+ o curl.h: add two missing defines for "pre ISO C" compilers [75]
+ o curl/parseconfig: fix mem-leak [81]
+ o curl/parseconfig: use curl_free() to free memory allocated by libcurl [80]
  o curl: fix --upload-file . hangs if delay in STDIN [35]
  o curl: fix -T globbing [16]
  o curl: improved cleanup in upload error path [69]
  o curl: show better error message when no homedir is found [47]
  o curl_setup_once: consistently use WHILE_FALSE in macros [54]
+ o define: remove HAVE_ENGINE_LOAD_BUILTIN_ENGINES, not used anymore [83]
  o docs: Change 'experiemental' to 'experimental' [30]
+ o docs: TLS SRP doesn't work with TLS 1.3 [87]
  o docs: fix several typos [62]
  o doh: improved both encoding and decoding [11]
  o doh: make it behave when built without proxy support [68]
@@ -54,6 +65,8 @@ This release includes the following bugfixes:
  o hostip: suppress compiler warning [64]
  o http_ntlm: Remove duplicate NSS initialisation [55]
  o lib: Move lib/ssh.h -> lib/vssh/ssh.h [9]
+ o lib: remove ASSIGNWITHINCONDITION exceptions, use our code style [84]
+ o libssh2: add support for ECDSA and ed25519 knownhost keys [89]
  o multi: free sockhash on OOM [63]
  o multi_poll: avoid busy-loop when called without easy handles attached [15]
  o ngtcp2: fix thread-safety bug in error-handling [33]
@@ -74,23 +87,31 @@ This release includes the following bugfixes:
  o projects: Fix Visual Studio wolfSSL configurations
  o quiche: reject HTTP/3 headers in the wrong order [17]
  o remove_handle: clear expire timers after multi_done() [20]
+ o runtests: --repeat=[num] to repeat tests [91]
  o runtests: introduce --shallow to reduce huge torture tests [70]
  o schannel: fix --tls-max for when min is --tlsv1 or default [39]
  o setopt: Fix ALPN / NPN user option when built without HTTP2 [42]
  o strerror: Add Curl_winapi_strerror for Win API specific errors [51]
  o strerror: Fix an error looking up some Windows error strings
+ o strerror: Fix compiler warning "empty expression" [79]
  o system.h: fix for MCST lcc compiler [23]
+ o test/sws: search for "Testno:" header unconditionally if no testno [73]
  o test1175: verify symbols-in-versions and libcurl-errors.3 in sync [28]
+ o test1270: a basic -w redirect_url test [82]
+ o test1456: remove the use of a fixed local port number [77]
  o test1558: use double slash after file: [21]
  o test1560: require IPv6 for IPv6 aware URL parsing [24]
  o tests/lib1557: fix mem-leak in OOM [66]
  o tests/lib1559: fix mem-leak in OOM [66]
+ o tests/lib1591: free memory properly on OOM, in the trailers callback [90]
  o tests/unit1607: fix mem-leak in OOM [66]
  o tests/unit1609: fix mem-leak in OOM [66]
  o tests/unit1620: fix bad free in OOM [66]
  o tests: fix build with `CURL_DISABLE_DOH` [64]
  o tests: fix permissions of ssh keys in WSL [58]
  o tests: make it possible to set executable extensions [58]
+ o tests: make sure checksrc runs on header files too
+ o tests: set LC_ALL=en_US.UTF-8 instead of blank in several tests [74]
  o tests: use DoH feature for DoH tests [64]
  o tests: use \r\n for log messages in WSL [58]
  o travis: abandon coveralls, it is not reliable [57]
@@ -98,6 +119,8 @@ This release includes the following bugfixes:
  o travis: export the CC/CXX variables when set [34]
  o vtls: make BearSSL possible to set with CURL_SSL_BACKEND [72]
  o winbuild: Define CARES_STATICLIB when WITH_CARES=static [59]
+ o winbuild: Document CURL_STATICLIB requirement for static libcurl [88]
+ o ngtcp2: Support the latest update key callback type [92]
 
 This release includes the following known bugs:
 
@@ -107,18 +130,20 @@ This release would not have looked like this without 
help, code, reports and
 advice from friends like these:
 
   3dyd on github, Anderson Sasaki, Andreas Falkenhahn, Andrew Ishchuk,
-  bdry on github, Bjoern Franke, Christian Schmitz, Christopher Reid,
-  Christoph M. Becker, Cynthia Coan, Dan Fandrich, Daniel Gustafsson,
-  Daniel Stenberg, David Benjamin, Gergely Nagy, Gisle Vanem, JanB on github,
-  Javier Blazquez, Jeff Mears, Jeffrey Walton, John Schroeder, Kamil Dudka,
-  Leonardo Taccari, Marcel Raad, Marc Hörsken, Maros Priputen,
-  Massimiliano Fantuzzi, Max Kellermann, Melissa Mears, Michael Forney,
+  bdry on github, Bjoern Franke, bxac on github, Bylon2 on github,
+  Christian Schmitz, Christopher Reid, Christoph M. Becker, Cynthia Coan,
+  Dan Fandrich, Daniel Gustafsson, Daniel Stenberg, David Benjamin,
+  Gergely Nagy, Gisle Vanem, JanB on github, Javier Blazquez, Jeff Mears,
+  Jeffrey Walton, John Schroeder, Kamil Dudka, Kunal Ekawde, Leonardo Taccari,
+  Marcel Raad, Marc Hörsken, Maros Priputen, Massimiliano Fantuzzi,
+  Max Kellermann, Melissa Mears, Michael Forney, Michael Vittiglio,
   Mohammad Hasbini, Niall O'Reilly, Paul Groke, Paul Hoffman,
-  Paulo Roberto Tomasi, Pavel Löbl, Pavel Pavlov, Peter Wu, Ray Satiro,
-  Richard Alcock, Richard Bowker, Shailesh Kapse, SLDiggie on github,
-  Steve Holme, Tatsuhiro Tsujikawa, Tom van der Woerdt, Victor Magierski,
-  Vlastimil Ovčáčík, Wyatt O'Day, Xiaoyin Liu,
-  (50 contributors)
+  Paulo Roberto Tomasi, Pavel Löbl, Pavel Pavlov, Peter Wu, Ram Krushna Mishra,
+  Ray Satiro, Richard Alcock, Richard Bowker, Santino Keupp, sayrer on github,
+  Shailesh Kapse, SLDiggie on github, Steve Holme, Tatsuhiro Tsujikawa,
+  Tom van der Woerdt, Victor Magierski, Vlastimil Ovčáčík, Wyatt O'Day,
+  Xiaoyin Liu,
+  (57 contributors)
 
         Thanks! (and sorry if I forgot to mention someone)
 
@@ -179,7 +204,7 @@ References to bug reports and discussions on issues:
  [53] = https://curl.haxx.se/bug/?i=4152
  [54] = https://curl.haxx.se/bug/?i=4649
  [55] = https://curl.haxx.se/bug/?i=3935
- [56] = https://curl.haxx.se/bug/?i=4647
+ [56] = https://curl.haxx.se/bug/?i=4301
  [57] = https://curl.haxx.se/bug/?i=4694
  [58] = https://curl.haxx.se/bug/?i=3899
  [59] = https://curl.haxx.se/bug/?i=4688
@@ -196,3 +221,23 @@ References to bug reports and discussions on issues:
  [70] = https://curl.haxx.se/bug/?i=4699
  [71] = https://curl.haxx.se/bug/?i=4369
  [72] = https://curl.haxx.se/bug/?i=4698
+ [73] = https://curl.haxx.se/bug/?i=4744
+ [74] = https://curl.haxx.se/bug/?i=4738
+ [75] = https://curl.haxx.se/bug/?i=4739
+ [76] = https://curl.haxx.se/bug/?i=4732
+ [77] = https://curl.haxx.se/bug/?i=4733
+ [78] = https://curl.haxx.se/bug/?i=4736
+ [79] = https://github.com/curl/curl/commit/5b22e1a#r36458547
+ [80] = https://curl.haxx.se/bug/?i=4730
+ [81] = https://curl.haxx.se/bug/?i=4731
+ [82] = https://curl.haxx.se/bug/?i=4728
+ [83] = https://curl.haxx.se/bug/?i=4725
+ [84] = https://curl.haxx.se/bug/?i=4683
+ [85] = https://curl.haxx.se/bug/?i=4296
+ [86] = https://curl.haxx.se/bug/?i=4261
+ [87] = https://curl.haxx.se/bug/?i=4262
+ [88] = https://curl.haxx.se/bug/?i=4721
+ [89] = https://curl.haxx.se/bug/?i=4714
+ [90] = https://curl.haxx.se/bug/?i=4720
+ [91] = https://curl.haxx.se/bug/?i=4715
+ [92] = https://curl.haxx.se/bug/?i=4735
diff --git a/docs/HISTORY.md b/docs/HISTORY.md
index 1e69f043f..a628d0509 100644
--- a/docs/HISTORY.md
+++ b/docs/HISTORY.md
@@ -285,6 +285,8 @@ April: added the cyassl backend (later renamed to WolfSSL)
 
  September: Web site had 245,000 unique visitors and served 236GB data
 
+ SMB and SMBS support
+
 2015
 ----
 
@@ -306,6 +308,8 @@ April: added the cyassl backend (later renamed to WolfSSL)
 2017
 ----
 
+ July: OSS-Fuzz started fuzzing libcurl
+
  September: Added Multi-SSL support
 
  The web site serves 3100 GB/month
diff --git a/docs/examples/url2file.c b/docs/examples/url2file.c
index 4d7511ba4..2d9e1a134 100644
--- a/docs/examples/url2file.c
+++ b/docs/examples/url2file.c
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
   /* Switch on full protocol/debug output while testing */
   curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L);
 
-  /* disable progress meter, set to 0L to enable and disable debug output */
+  /* disable progress meter, set to 0L to enable it */
   curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
 
   /* send all data to this function  */
diff --git a/docs/libcurl/opts/GNURLOPT_POSTQUOTE.3 
b/docs/libcurl/opts/GNURLOPT_POSTQUOTE.3
index c87d3fdc1..f4ebeb00a 100644
--- a/docs/libcurl/opts/GNURLOPT_POSTQUOTE.3
+++ b/docs/libcurl/opts/GNURLOPT_POSTQUOTE.3
@@ -40,16 +40,16 @@ NULL
 SFTP and FTP
 .SH EXAMPLE
 .nf
-struct curl_slist *h = NULL;
-h = curl_slist_append(h, "RNFR source-name");
-h = curl_slist_append(h, "RNTO new-name");
+struct curl_slist *cmdlist = NULL;
+cmdlist = curl_slist_append(cmdlist, "RNFR source-name");
+cmdlist = curl_slist_append(cmdlist, "RNTO new-name");
 
 curl = curl_easy_init();
 if(curl) {
   curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin";);
 
   /* pass in the FTP commands to run after the transfer */
-  curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
+  curl_easy_setopt(curl, CURLOPT_POSTQUOTE, cmdlist);
 
   ret = curl_easy_perform(curl);
 
diff --git a/docs/libcurl/opts/GNURLOPT_PREQUOTE.3 
b/docs/libcurl/opts/GNURLOPT_PREQUOTE.3
index 80f23ff3e..10bb993a6 100644
--- a/docs/libcurl/opts/GNURLOPT_PREQUOTE.3
+++ b/docs/libcurl/opts/GNURLOPT_PREQUOTE.3
@@ -43,15 +43,15 @@ NULL
 FTP
 .SH EXAMPLE
 .nf
-struct curl_slist *h = NULL;
-h = curl_slist_append(h, "SYST");
+struct curl_slist *cmdlist = NULL;
+cmdlist = curl_slist_append(cmdlist, "SYST");
 
 curl = curl_easy_init();
 if(curl) {
   curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin";);
 
   /* pass in the FTP commands to run */
-  curl_easy_setopt(curl, CURLOPT_PREQUOTE, headerlist);
+  curl_easy_setopt(curl, CURLOPT_PREQUOTE, cmdlist);
 
   ret = curl_easy_perform(curl);
 
diff --git a/docs/libcurl/opts/GNURLOPT_QUOTE.3 
b/docs/libcurl/opts/GNURLOPT_QUOTE.3
index 31c6dbff6..7740d1d6a 100644
--- a/docs/libcurl/opts/GNURLOPT_QUOTE.3
+++ b/docs/libcurl/opts/GNURLOPT_QUOTE.3
@@ -81,16 +81,16 @@ NULL
 SFTP and FTP
 .SH EXAMPLE
 .nf
-struct curl_slist *h = NULL;
-h = curl_slist_append(h, "RNFR source-name");
-h = curl_slist_append(h, "RNTO new-name");
+struct curl_slist *cmdlist = NULL;
+cmdlist = curl_slist_append(cmdlist, "RNFR source-name");
+cmdlist = curl_slist_append(cmdlist, "RNTO new-name");
 
 curl = curl_easy_init();
 if(curl) {
   curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin";);
 
   /* pass in the FTP commands to run before the transfer */
-  curl_easy_setopt(curl, CURLOPT_QUOTE, headerlist);
+  curl_easy_setopt(curl, CURLOPT_QUOTE, cmdlist);
 
   ret = curl_easy_perform(curl);
 
diff --git a/docs/libcurl/opts/GNURLOPT_URL.3 b/docs/libcurl/opts/GNURLOPT_URL.3
index 6b377e4c7..473ea4f8a 100644
--- a/docs/libcurl/opts/GNURLOPT_URL.3
+++ b/docs/libcurl/opts/GNURLOPT_URL.3
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
+.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <address@hidden>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
@@ -227,7 +227,6 @@ scp://address@hidden/etc/issue - This specifies the file 
/etc/issue
 
 scp://example.com/~/my-file - This specifies the file my-file in the
 user's home directory on the server
-
 .IP SFTP
 The path part of a SFTP request specifies the file to retrieve and from what
 directory. If the file part is omitted then libcurl downloads the directory
@@ -260,6 +259,7 @@ in the root of the "files" share
 smb://server.example.com/files/ -T issue - This specifies the file "issue" will
 be uploaded to the root of the "files" share.
 
+curl supports SMB version 1 (only)
 .IP LDAP
 The path part of a LDAP request can be used to specify the: Distinguished
 Name, Attributes, Scope, Filter and Extension for a LDAP search. Each field
diff --git a/include/gnurl/curl.h b/include/gnurl/curl.h
index bef8a0bca..a9754fd64 100644
--- a/include/gnurl/curl.h
+++ b/include/gnurl/curl.h
@@ -956,6 +956,8 @@ typedef enum {
 /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
 #define LONG          CURLOPTTYPE_LONG
 #define OBJECTPOINT   CURLOPTTYPE_OBJECTPOINT
+#define STRINGPOINT   CURLOPTTYPE_OBJECTPOINT
+#define SLISTPOINT    CURLOPTTYPE_OBJECTPOINT
 #define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
 #define OFF_T         CURLOPTTYPE_OFF_T
 #define CINIT(name,type,number) CURLOPT_/**/name = type + number
diff --git a/lib/strerror.c b/lib/strerror.c
index c0b92692d..91b241e18 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -872,7 +872,7 @@ const char *Curl_sspi_strerror(int err, char *buf, size_t 
buflen)
     case SEC_E_OK:
       txt = "No error";
       break;
-#define SEC2TXT(sec) case sec: txt = #sec; break;
+#define SEC2TXT(sec) case sec: txt = #sec; break
     SEC2TXT(CRYPT_E_REVOKED);
     SEC2TXT(SEC_E_ALGORITHM_MISMATCH);
     SEC2TXT(SEC_E_BAD_BINDINGS);
diff --git a/lib/url.c b/lib/url.c
index 4111eec3a..56fb73636 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3594,24 +3594,6 @@ static CURLcode create_conn(struct Curl_easy *data,
   else
     reuse = ConnectionExists(data, conn, &conn_temp, &force_reuse, &waitpipe);
 
-  /* If we found a reusable connection that is now marked as in use, we may
-     still want to open a new connection if we are multiplexing. */
-  if(reuse && !force_reuse && IsMultiplexingPossible(data, conn_temp)) {
-    size_t multiplexed = CONN_INUSE(conn_temp);
-    if(multiplexed > 0) {
-      infof(data, "Found connection %ld, with %zu requests on it\n",
-            conn_temp->connection_id, multiplexed);
-
-      if(Curl_conncache_bundle_size(conn_temp) < max_host_connections &&
-         Curl_conncache_size(data) < max_total_connections) {
-        /* We want a new connection anyway */
-        reuse = FALSE;
-
-        infof(data, "We can reuse, but we want a new connection anyway\n");
-      }
-    }
-  }
-
   if(reuse) {
     /*
      * We already have a connection for this, we got the former connection
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c
index c39dba23a..e97e9e871 100644
--- a/lib/vquic/ngtcp2.c
+++ b/lib/vquic/ngtcp2.c
@@ -177,15 +177,6 @@ static int quic_set_encryption_secrets(SSL *ssl,
   if(level == NGTCP2_CRYPTO_LEVEL_APP) {
     if(init_ngh3_conn(qs) != CURLE_OK)
       return 0;
-
-    /* malloc an area big enough for both secrets */
-    qs->rx_secret = malloc(secretlen * 2);
-    if(!qs->rx_secret)
-      return 0;
-    memcpy(qs->rx_secret, rx_secret, secretlen);
-    memcpy(&qs->rx_secret[secretlen], tx_secret, secretlen);
-    qs->tx_secret = &qs->rx_secret[secretlen];
-    qs->rx_secretlen = secretlen;
   }
 
   return 1;
@@ -516,25 +507,6 @@ static int cb_get_new_connection_id(ngtcp2_conn *tconn, 
ngtcp2_cid *cid,
   return 0;
 }
 
-static int cb_update_key(ngtcp2_conn *tconn, uint8_t *rx_key,
-                         uint8_t *rx_iv, uint8_t *tx_key,
-                         uint8_t *tx_iv, void *user_data)
-{
-  struct quicsocket *qs = (struct quicsocket *)user_data;
-  uint8_t rx_secret[64];
-  uint8_t tx_secret[64];
-
-  if(ngtcp2_crypto_update_key(tconn, rx_secret, tx_secret,
-                              rx_key, rx_iv, tx_key, tx_iv, qs->rx_secret,
-                              qs->tx_secret, qs->rx_secretlen) != 0)
-    return NGTCP2_ERR_CALLBACK_FAILURE;
-
-  /* store the updated secrets */
-  memcpy(qs->rx_secret, rx_secret, qs->rx_secretlen);
-  memcpy(qs->tx_secret, tx_secret, qs->rx_secretlen);
-  return 0;
-}
-
 static ngtcp2_conn_callbacks ng_callbacks = {
   cb_initial,
   NULL, /* recv_client_initial */
@@ -556,7 +528,7 @@ static ngtcp2_conn_callbacks ng_callbacks = {
   NULL, /* rand  */
   cb_get_new_connection_id,
   NULL, /* remove_connection_id */
-  cb_update_key, /* update_key */
+  ngtcp2_crypto_update_key_cb, /* update_key */
   NULL, /* path_validation */
   NULL, /* select_preferred_addr */
   cb_stream_reset,
@@ -701,7 +673,6 @@ static CURLcode ng_disconnect(struct connectdata *conn,
   int i;
   struct quicsocket *qs = &conn->hequic[0];
   (void)dead_connection;
-  free(qs->rx_secret);
   if(qs->ssl)
     SSL_free(qs->ssl);
   for(i = 0; i < 3; i++)
diff --git a/lib/vquic/ngtcp2.h b/lib/vquic/ngtcp2.h
index 82b8d41e3..30d442fdd 100644
--- a/lib/vquic/ngtcp2.h
+++ b/lib/vquic/ngtcp2.h
@@ -46,9 +46,6 @@ struct quicsocket {
   ngtcp2_settings settings;
   SSL_CTX *sslctx;
   SSL *ssl;
-  uint8_t *rx_secret; /* malloced */
-  uint8_t *tx_secret; /* points into the above buffer */
-  size_t rx_secretlen;
   struct quic_handshake crypto_data[3];
   /* the last TLS alert description generated by the local endpoint */
   uint8_t tls_alert;
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index 9b32e54a0..a9057ea31 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -97,6 +97,8 @@ int parseconfig(const char *filename, struct GlobalConfig 
*global)
       int i = 0;
       char prefix = '.';
       do {
+        /* if it was allocated in a previous attempt */
+        curl_free(pathalloc);
         /* check for .curlrc then _curlrc in the home dir */
         pathalloc = curl_maprintf("%s%s%ccurlrc", home, DIR_CHAR, prefix);
         if(!pathalloc) {
@@ -285,7 +287,7 @@ int parseconfig(const char *filename, struct GlobalConfig 
*global)
   else
     rc = 1; /* couldn't open the file */
 
-  free(pathalloc);
+  curl_free(pathalloc);
   return rc;
 }
 
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
index 29a66ee8d..7f8ef7d06 100644
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@ -143,7 +143,7 @@ test1236 test1237 test1238 test1239 test1240 test1241 
test1242 test1243 \
 test1244 test1245 test1246 test1247 test1248 test1249 test1250 test1251 \
 test1252 test1253 test1254 test1255 test1256 test1257 test1258 test1259 \
 test1260 test1261 test1262 test1263 test1264 test1265 test1266 test1267 \
-test1268 test1269 \
+test1268 test1269 test1270 \
 \
 test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \
 test1288 test1289 test1290 test1291 test1292 \
diff --git a/tests/data/test1270 b/tests/data/test1270
new file mode 100644
index 000000000..25799818a
--- /dev/null
+++ b/tests/data/test1270
@@ -0,0 +1,69 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+redirect_url
+followlocation
+--write-out
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data nocheck="yes">
+HTTP/1.1 302 Captive Portal
+Server: ohlala/2000
+Date: Tue, 17 Dec 2019 13:08:30 GMT
+Cache-Control: no-cache,no-store,must-revalidate,post-check=0,pre-check=0
+Location: https://moo.moo.moo
+Content-Type: text/html; charset=utf-8
+X-Frame-Options: SAMEORIGIN
+Strict-Transport-Security: max-age=604800
+Content-Length: 0
+Connection: close
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+Basic 'redirect_url'
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/we/want/our/1270 -w '%{redirect_url}\n' -s
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET /we/want/our/1270 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+
+<stdout>
+HTTP/1.1 302 Captive Portal
+Server: ohlala/2000
+Date: Tue, 17 Dec 2019 13:08:30 GMT
+Cache-Control: no-cache,no-store,must-revalidate,post-check=0,pre-check=0
+Location: https://moo.moo.moo
+Content-Type: text/html; charset=utf-8
+X-Frame-Options: SAMEORIGIN
+Strict-Transport-Security: max-age=604800
+Content-Length: 0
+Connection: close
+
+https://moo.moo.moo/
+</stdout>
+</verify>
+</testcase>
diff --git a/tests/data/test1448 b/tests/data/test1448
index e04f47bde..8de2fd1c6 100644
--- a/tests/data/test1448
+++ b/tests/data/test1448
@@ -41,7 +41,7 @@ http
 idn
 </features>
 <setenv>
-LC_ALL=
+LC_ALL=en_US.UTF-8
 LC_CTYPE=en_US.UTF-8
 </setenv>
 <precheck>
diff --git a/tests/data/test1455 b/tests/data/test1455
index cbe6fe22e..8483d7bb8 100644
--- a/tests/data/test1455
+++ b/tests/data/test1455
@@ -37,7 +37,7 @@ http
 HTTP GET when PROXY Protocol enabled
 </name>
 <command>
-http://%HOSTIP:%HTTPPORT/1455 --haproxy-protocol
+http://%HOSTIP:%HTTPPORT/1455 --haproxy-protocol -H "Testno: 1455"
 </command>
 <features>
 proxy
@@ -58,6 +58,7 @@ proxy-line
 GET /1455 HTTP/1.1
 Host: %HOSTIP:%HTTPPORT
 Accept: */*
+Testno: 1455
 
 </protocol>
 </verify>
diff --git a/tests/data/test1456 b/tests/data/test1456
index 27d63f505..16a78b2af 100644
--- a/tests/data/test1456
+++ b/tests/data/test1456
@@ -40,7 +40,7 @@ http-ipv6
 HTTP-IPv6 GET with PROXY protocol
  </name>
  <command>
--g "http://%HOST6IP:%HTTP6PORT/1456"; --local-port 44444 --haproxy-protocol
+-g "http://%HOST6IP:%HTTP6PORT/1456"; --haproxy-protocol
 </command>
 <features>
 proxy
@@ -53,8 +53,14 @@ proxy
 <strip>
 ^User-Agent:
 </strip>
+
+# Strip off the (random) local port number. This test used to use a fixed
+# local port number that frequently causes the test to fail
+<strippart>
+s/PROXY TCP6 ::1 ::1 (\d+) (\d+)/PROXY TCP6 ::1 ::1 $2/
+</strippart>
 <protocol>
-PROXY TCP6 ::1 ::1 44444 %HTTP6PORT
+PROXY TCP6 ::1 ::1 %HTTP6PORT
 GET /1456 HTTP/1.1
 Host: %HOST6IP:%HTTP6PORT
 Accept: */*
diff --git a/tests/data/test165 b/tests/data/test165
index 9009425aa..47de3919b 100644
--- a/tests/data/test165
+++ b/tests/data/test165
@@ -32,7 +32,7 @@ idn
 proxy
 </features>
 <setenv>
-LC_ALL=
+LC_ALL=en_US.UTF-8
 LC_CTYPE=en_US.UTF-8
 </setenv>
 <precheck>
diff --git a/tests/data/test2046 b/tests/data/test2046
index dcd202f04..ec49c8639 100644
--- a/tests/data/test2046
+++ b/tests/data/test2046
@@ -41,7 +41,7 @@ http
 idn
 </features>
 <setenv>
-LC_ALL=
+LC_ALL=en_US.UTF-8
 LC_CTYPE=en_US.UTF-8
 </setenv>
 <precheck>
diff --git a/tests/data/test2047 b/tests/data/test2047
index bc7350971..d3654c785 100644
--- a/tests/data/test2047
+++ b/tests/data/test2047
@@ -42,7 +42,7 @@ http
 idn
 </features>
 <setenv>
-LC_ALL=
+LC_ALL=en_US.UTF-8
 LC_CTYPE=en_US.UTF-8
 </setenv>
 <precheck>
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 963357799..c1bbdf7e0 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -367,6 +367,8 @@ static int parse_servercmd(struct httprequest *req)
 
   filename = test2file(req->testno);
   req->close = FALSE;
+  req->connmon = FALSE;
+
   stream = fopen(filename, "rb");
   if(!stream) {
     error = errno;
@@ -391,8 +393,6 @@ static int parse_servercmd(struct httprequest *req)
       return 1; /* done */
     }
 
-    req->connmon = FALSE;
-
     cmd = orgcmd;
     while(cmd && cmdsize) {
       char *check;
@@ -540,12 +540,11 @@ static int ProcessRequest(struct httprequest *req)
         msnprintf(logbuf, sizeof(logbuf), "Requested test number %ld part %ld",
                   req->testno, req->partno);
         logmsg("%s", logbuf);
-
-        /* find and parse <servercmd> for this test */
-        parse_servercmd(req);
       }
-      else
+      else {
+        logmsg("No test number");
         req->testno = DOCNUMBER_NOTHING;
+      }
 
     }
 
@@ -605,14 +604,6 @@ static int ProcessRequest(struct httprequest *req)
       }
     }
 
-    if(req->testno == DOCNUMBER_NOTHING) {
-      /* check for a Testno: header with the test case number */
-      char *testno = strstr(line, "\nTestno: ");
-      if(testno) {
-        req->testno = strtol(&testno[9], NULL, 10);
-        logmsg("Found test number %d in Testno: header!", req->testno);
-      }
-    }
     if(req->testno == DOCNUMBER_NOTHING) {
       /* Still no test case number. Try to get the the number off the last dot
          instead, IE we consider the TLD to be the test number. Test 123 can
@@ -653,8 +644,8 @@ static int ProcessRequest(struct httprequest *req)
     }
   }
   else if((req->offset >= 3) && (req->testno == DOCNUMBER_NOTHING)) {
-    logmsg("** Unusual request. Starts with %02x %02x %02x",
-           line[0], line[1], line[2]);
+    logmsg("** Unusual request. Starts with %02x %02x %02x (%c%c%c)",
+           line[0], line[1], line[2], line[0], line[1], line[2]);
   }
 
   if(!end) {
@@ -662,7 +653,22 @@ static int ProcessRequest(struct httprequest *req)
     logmsg("request not complete yet");
     return 0; /* not complete yet */
   }
-  logmsg("- request found to be complete");
+  logmsg("- request found to be complete (%d)", req->testno);
+
+  if(req->testno == DOCNUMBER_NOTHING) {
+    /* check for a Testno: header with the test case number */
+    char *testno = strstr(line, "\nTestno: ");
+    if(testno) {
+      req->testno = strtol(&testno[9], NULL, 10);
+      logmsg("Found test number %d in Testno: header!", req->testno);
+    }
+    else {
+      logmsg("No Testno: header");
+    }
+  }
+
+  /* find and parse <servercmd> for this test */
+  parse_servercmd(req);
 
   if(use_gopher) {
     /* when using gopher we cannot check the request until the entire

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]