package/libressl: always expose SSL_OP_NO_TLSv1_3
authorFrancois Perrad <fperrad@gmail.com>
Fri, 20 Aug 2021 10:04:39 +0000 (12:04 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 20 Aug 2021 21:27:15 +0000 (23:27 +0200)
Fixes the build of vsftpd 3.0.4

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libressl/0001-always-expose-SSL_OP_NO_TLSv1_3.patch [new file with mode: 0644]

diff --git a/package/libressl/0001-always-expose-SSL_OP_NO_TLSv1_3.patch b/package/libressl/0001-always-expose-SSL_OP_NO_TLSv1_3.patch
new file mode 100644 (file)
index 0000000..f34ae85
--- /dev/null
@@ -0,0 +1,37 @@
+always expose SSL_OP_NO_TLSv1_3
+
+like in OpenSSL, see https://github.com/openssl/openssl/blob/master/include/openssl/ssl.h.in#L399
+
+like SSL_OP_NO_DTLSv1_2, see commit "Expose various DTLSv1.2 specific functions and defines"
+
+this change fixes the compilation of vsftpd 3.0.4 & 3.0.5, which fails with the following error:
+```
+ssl.c: In function 'ssl_init':
+ssl.c:98:18: error: 'SSL_OP_NO_TLSv1_3' undeclared (first use in this function); did you mean 'SSL_OP_NO_TLSv1_1'?
+```
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+Fetched from: https://github.com/libressl-portable/openbsd/pull/124
+---
+ include/openssl/ssl.h | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
+index 46f24b2ea..4048a6e63 100644
+--- a/include/openssl/ssl.h
++++ b/include/openssl/ssl.h
+@@ -516,11 +516,7 @@ typedef int (*tls_session_secret_cb_fn)(SSL *s, void *secret, int *secret_len,
+ #define SSL_OP_NO_TLSv1                                       0x04000000L
+ #define SSL_OP_NO_TLSv1_2                             0x08000000L
+ #define SSL_OP_NO_TLSv1_1                             0x10000000L
+-
+-#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
+ #define SSL_OP_NO_TLSv1_3                             0x20000000L
+-#endif
+-
+ #define SSL_OP_NO_DTLSv1                              0x40000000L
+ #define SSL_OP_NO_DTLSv1_2                            0x80000000L
+-- 
+2.30.2
+