Date: Fri, 1 Feb 2019 21:42:40 +0000 (UTC) From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r491866 - in head/ftp/pure-ftpd: . files Message-ID: <201902012142.x11LgeBq014966@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sunpoet Date: Fri Feb 1 21:42:39 2019 New Revision: 491866 URL: https://svnweb.freebsd.org/changeset/ports/491866 Log: Fix TLS 1.3 compatibility - Bump PORTREVISION for package change Obtained from: https://github.com/jedisct1/pure-ftpd/commit/4a495c61ce22c893aed5ee57f6ce0b43c3be59ad PR: 235354 Reported by: Matt Churchyard <churchers@gmail.com> Added: head/ftp/pure-ftpd/files/patch-src-tls.c (contents, props changed) Modified: head/ftp/pure-ftpd/Makefile Modified: head/ftp/pure-ftpd/Makefile ============================================================================== --- head/ftp/pure-ftpd/Makefile Fri Feb 1 21:42:34 2019 (r491865) +++ head/ftp/pure-ftpd/Makefile Fri Feb 1 21:42:39 2019 (r491866) @@ -3,6 +3,7 @@ PORTNAME= pure-ftpd PORTVERSION= 1.0.47 +PORTREVISION= 1 CATEGORIES= ftp ipv6 MASTER_SITES= https://github.com/jedisct1/${PORTNAME}/releases/download/${PORTVERSION}/ \ https://download.pureftpd.org/pub/pure-ftpd/releases/ \ Added: head/ftp/pure-ftpd/files/patch-src-tls.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/ftp/pure-ftpd/files/patch-src-tls.c Fri Feb 1 21:42:39 2019 (r491866) @@ -0,0 +1,36 @@ +Obtained from: https://github.com/jedisct1/pure-ftpd/commit/4a495c61ce22c893aed5ee57f6ce0b43c3be59ad + +--- src/tls.c.orig 2017-08-18 23:47:43 UTC ++++ src/tls.c +@@ -228,7 +228,16 @@ static void ssl_info_cb(const SSL *cnx, + if ((where & SSL_CB_HANDSHAKE_START) != 0) { + if ((cnx == tls_cnx && tls_cnx_handshook != 0) || + (cnx == tls_data_cnx && tls_data_cnx_handshook != 0)) { +- die(400, LOG_ERR, "TLS renegociation"); ++ const SSL_CIPHER *cipher; ++ const char *cipher_version; ++ if ((cipher = SSL_get_current_cipher(cnx)) == NULL || ++ (cipher_version = SSL_CIPHER_get_version(cipher)) == NULL) { ++ die(400, LOG_ERR, "No cipher"); ++ } ++ if (strcmp(cipher_version, "TLSv1.3") != 0) { ++ die(400, LOG_ERR, "TLS renegociation"); ++ return; ++ } + } + return; + } +@@ -264,10 +273,10 @@ int tls_init_library(void) + OpenSSL_add_all_algorithms(); + # else + OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | +- OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); ++ OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); + OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | +- OPENSSL_INIT_ADD_ALL_DIGESTS | +- OPENSSL_INIT_LOAD_CONFIG, NULL); ++ OPENSSL_INIT_ADD_ALL_DIGESTS | ++ OPENSSL_INIT_LOAD_CONFIG, NULL); + # endif + while (RAND_status() == 0) { + rnd = zrand();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902012142.x11LgeBq014966>