Blame SOURCES/0003-curl-7.61.1-TLS-1.3-PHA.patch

b35f73
From bb8ad3da3fb4ab3f6556daa1f67b259c12a3c7de Mon Sep 17 00:00:00 2001
b35f73
From: Christian Heimes <christian@python.org>
b35f73
Date: Fri, 21 Sep 2018 10:37:43 +0200
b35f73
Subject: [PATCH] OpenSSL: enable TLS 1.3 post-handshake auth
b35f73
b35f73
OpenSSL 1.1.1 requires clients to opt-in for post-handshake
b35f73
authentication.
b35f73
b35f73
Fixes: https://github.com/curl/curl/issues/3026
b35f73
Signed-off-by: Christian Heimes <christian@python.org>
b35f73
b35f73
Closes https://github.com/curl/curl/pull/3027
b35f73
b35f73
Upstream-commit: b939bc47b27cd57c6ebb852ad653933e4124b452
b35f73
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
b35f73
---
b35f73
 lib/vtls/openssl.c | 6 ++++++
b35f73
 1 file changed, 6 insertions(+)
b35f73
b35f73
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
b35f73
index a487f55..78970d1 100644
b35f73
--- a/lib/vtls/openssl.c
b35f73
+++ b/lib/vtls/openssl.c
b35f73
@@ -178,6 +178,7 @@ static unsigned long OpenSSL_version_num(void)
b35f73
      !defined(LIBRESSL_VERSION_NUMBER) &&       \
b35f73
      !defined(OPENSSL_IS_BORINGSSL))
b35f73
 #define HAVE_SSL_CTX_SET_CIPHERSUITES
b35f73
+#define HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
b35f73
 #endif
b35f73
 
b35f73
 #if defined(LIBRESSL_VERSION_NUMBER)
b35f73
@@ -2467,6 +2468,11 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
b35f73
   }
b35f73
 #endif
b35f73
 
b35f73
+#ifdef HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
b35f73
+  /* OpenSSL 1.1.1 requires clients to opt-in for PHA */
b35f73
+  SSL_CTX_set_post_handshake_auth(BACKEND->ctx, 1);
b35f73
+#endif
b35f73
+
b35f73
 #ifdef USE_TLS_SRP
b35f73
   if(ssl_authtype == CURL_TLSAUTH_SRP) {
b35f73
     char * const ssl_username = SSL_SET_OPTION(username);
b35f73
-- 
b35f73
2.17.1
b35f73