0001-mbedtls-fix-compile-when-h2-enabled.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. From 6eb7fb37d901ed1e4ce07cbd628ee11bf02db1f3 Mon Sep 17 00:00:00 2001
  2. From: Daniel Stenberg <daniel@haxx.se>
  3. Date: Thu, 28 Apr 2022 17:11:50 +0200
  4. Subject: [PATCH] mbedtls: fix compile when h2-enabled
  5. Fixes #8766
  6. Reported-by: LigH-de on github
  7. Closes #8768
  8. Downloaded from upstream commit
  9. https://github.com/curl/curl/commit/6eb7fb37d901ed1e4ce07cbd628ee11bf02db1f3
  10. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  11. ---
  12. lib/vtls/mbedtls.c | 4 ++--
  13. 1 file changed, 2 insertions(+), 2 deletions(-)
  14. diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
  15. index 64f57c5d8321..5f9b87e6b75b 100644
  16. --- a/lib/vtls/mbedtls.c
  17. +++ b/lib/vtls/mbedtls.c
  18. @@ -815,8 +815,8 @@ mbed_connect_step2(struct Curl_easy *data, struct connectdata *conn,
  19. if(next_protocol) {
  20. infof(data, VTLS_INFOF_ALPN_ACCEPTED_1STR, next_protocol);
  21. #ifdef USE_HTTP2
  22. - if(!strncmp(next_protocol, ALPN_H2, ALPN_H2_LEN) &&
  23. - !next_protocol[ALPN_H2_LEN]) {
  24. + if(!strncmp(next_protocol, ALPN_H2, ALPN_H2_LENGTH) &&
  25. + !next_protocol[ALPN_H2_LENGTH]) {
  26. conn->negnpn = CURL_HTTP_VERSION_2;
  27. }
  28. else