1 |
commit: 89b2b973f06a8be98a052a6e9ba17c5e1642874e |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 31 17:52:42 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 31 17:52:42 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89b2b973 |
7 |
|
8 |
net-ftp/pure-ftpd: add TLS 1.3 support |
9 |
|
10 |
Package-Manager: Portage-2.3.58, Repoman-2.3.12 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
.../pure-ftpd/files/pure-ftpd-1.0.47-TLSv1.3.patch | 46 ++++++++++++++++++++++ |
14 |
...1.0.47-r2.ebuild => pure-ftpd-1.0.47-r3.ebuild} | 3 +- |
15 |
2 files changed, 48 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-TLSv1.3.patch b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-TLSv1.3.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..65f19bf49da |
20 |
--- /dev/null |
21 |
+++ b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.47-TLSv1.3.patch |
22 |
@@ -0,0 +1,46 @@ |
23 |
+From 4a495c61ce22c893aed5ee57f6ce0b43c3be59ad Mon Sep 17 00:00:00 2001 |
24 |
+From: Frank Denis <github@××××××××.org> |
25 |
+Date: Wed, 19 Sep 2018 23:53:45 +0200 |
26 |
+Subject: [PATCH] TLS1.3 compatibility |
27 |
+ |
28 |
+Fixes #94 |
29 |
+--- |
30 |
+ src/tls.c | 17 +++++++++++++---- |
31 |
+ 1 file changed, 13 insertions(+), 4 deletions(-) |
32 |
+ |
33 |
+diff --git a/src/tls.c b/src/tls.c |
34 |
+index c693d3b..f383ed9 100644 |
35 |
+--- a/src/tls.c |
36 |
++++ b/src/tls.c |
37 |
+@@ -228,7 +228,16 @@ static void ssl_info_cb(const SSL *cnx, int where, int ret) |
38 |
+ if ((where & SSL_CB_HANDSHAKE_START) != 0) { |
39 |
+ if ((cnx == tls_cnx && tls_cnx_handshook != 0) || |
40 |
+ (cnx == tls_data_cnx && tls_data_cnx_handshook != 0)) { |
41 |
+- die(400, LOG_ERR, "TLS renegociation"); |
42 |
++ const SSL_CIPHER *cipher; |
43 |
++ const char *cipher_version; |
44 |
++ if ((cipher = SSL_get_current_cipher(cnx)) == NULL || |
45 |
++ (cipher_version = SSL_CIPHER_get_version(cipher)) == NULL) { |
46 |
++ die(400, LOG_ERR, "No cipher"); |
47 |
++ } |
48 |
++ if (strcmp(cipher_version, "TLSv1.3") != 0) { |
49 |
++ die(400, LOG_ERR, "TLS renegociation"); |
50 |
++ return; |
51 |
++ } |
52 |
+ } |
53 |
+ return; |
54 |
+ } |
55 |
+@@ -264,10 +273,10 @@ int tls_init_library(void) |
56 |
+ OpenSSL_add_all_algorithms(); |
57 |
+ # else |
58 |
+ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | |
59 |
+- OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); |
60 |
++ OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); |
61 |
+ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | |
62 |
+- OPENSSL_INIT_ADD_ALL_DIGESTS | |
63 |
+- OPENSSL_INIT_LOAD_CONFIG, NULL); |
64 |
++ OPENSSL_INIT_ADD_ALL_DIGESTS | |
65 |
++ OPENSSL_INIT_LOAD_CONFIG, NULL); |
66 |
+ # endif |
67 |
+ while (RAND_status() == 0) { |
68 |
+ rnd = zrand(); |
69 |
|
70 |
diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.47-r2.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.47-r3.ebuild |
71 |
similarity index 98% |
72 |
rename from net-ftp/pure-ftpd/pure-ftpd-1.0.47-r2.ebuild |
73 |
rename to net-ftp/pure-ftpd/pure-ftpd-1.0.47-r3.ebuild |
74 |
index 864c1ad8237..58e90f89ddc 100644 |
75 |
--- a/net-ftp/pure-ftpd/pure-ftpd-1.0.47-r2.ebuild |
76 |
+++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.47-r3.ebuild |
77 |
@@ -1,4 +1,4 @@ |
78 |
-# Copyright 1999-2018 Gentoo Authors |
79 |
+# Copyright 1999-2019 Gentoo Authors |
80 |
# Distributed under the terms of the GNU General Public License v2 |
81 |
|
82 |
EAPI=7 |
83 |
@@ -43,6 +43,7 @@ RDEPEND="${DEPEND} |
84 |
PATCHES=( |
85 |
"${FILESDIR}/${PN}-1.0.28-pam.patch" |
86 |
"${FILESDIR}/${PN}-1.0.47-MAX_DATA_SIZE.patch" |
87 |
+ "${FILESDIR}/${PN}-1.0.47-TLSv1.3.patch" |
88 |
) |
89 |
|
90 |
src_configure() { |