From owner-svn-ports-all@freebsd.org Fri Nov 9 15:47:00 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 194131132EE3; Fri, 9 Nov 2018 15:47:00 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 986857FC94; Fri, 9 Nov 2018 15:46:59 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 793B515F00; Fri, 9 Nov 2018 15:46:59 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA9FkxQv041258; Fri, 9 Nov 2018 15:46:59 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA9FkwNj041256; Fri, 9 Nov 2018 15:46:58 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201811091546.wA9FkwNj041256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Fri, 9 Nov 2018 15:46:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r484518 - in head/devel/ptlib: . files X-SVN-Group: ports-head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: in head/devel/ptlib: . files X-SVN-Commit-Revision: 484518 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 986857FC94 X-Spamd-Result: default: False [-106.87 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; ALLOW_DOMAIN_WHITELIST(-100.00)[FreeBSD.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[FreeBSD.org]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: mx1.FreeBSD.org]; NEURAL_HAM_SHORT(-1.00)[-0.999,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; IP_SCORE(-3.76)[ip: (-9.91), ipnet: 2610:1c1:1::/48(-4.93), asn: 11403(-3.87), country: US(-0.09)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2018 15:47:00 -0000 Author: swills Date: Fri Nov 9 15:46:58 2018 New Revision: 484518 URL: https://svnweb.freebsd.org/changeset/ports/484518 Log: devel/ptlib: fix build with OpenSSL 1.1 PR: 229023 Submitted by: brnrd (based on) Added: head/devel/ptlib/files/extra-patch-src_ptclib_pssl.cxx (contents, props changed) - copied, changed from r484517, head/devel/ptlib/files/patch-src_ptclib_pssl.cxx head/devel/ptlib/files/extra-patch-src_ptclib_pssl.cxx-openssl111 (contents, props changed) Deleted: head/devel/ptlib/files/patch-src_ptclib_pssl.cxx Modified: head/devel/ptlib/Makefile (contents, props changed) Modified: head/devel/ptlib/Makefile ============================================================================== --- head/devel/ptlib/Makefile Fri Nov 9 15:42:40 2018 (r484517) +++ head/devel/ptlib/Makefile Fri Nov 9 15:46:58 2018 (r484518) @@ -46,6 +46,12 @@ DEBUG_DESC= Install debug library .include +.if ${OSVERSION} > 1200085 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_ptclib_pssl.cxx-openssl111 +.else +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_ptclib_pssl.cxx +.endif + PLIST_SUB+= PORTVERSION=${PORTVERSION} \ PVERSION_MAJOR=${PVERSION_MAJOR} \ PVERSION_MINOR=${PVERSION_MINOR} Copied and modified: head/devel/ptlib/files/extra-patch-src_ptclib_pssl.cxx (from r484517, head/devel/ptlib/files/patch-src_ptclib_pssl.cxx) ============================================================================== Added: head/devel/ptlib/files/extra-patch-src_ptclib_pssl.cxx-openssl111 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ptlib/files/extra-patch-src_ptclib_pssl.cxx-openssl111 Fri Nov 9 15:46:58 2018 (r484518) @@ -0,0 +1,143 @@ +--- src/ptclib/pssl.cxx.orig 2013-08-14 18:20:27.000000000 -0500 ++++ src/ptclib/pssl.cxx 2018-11-06 11:53:45.651466000 -0600 +@@ -140,7 +140,7 @@ + class PSSL_BIO + { + public: +- PSSL_BIO(BIO_METHOD *method = BIO_s_file_internal()) ++ PSSL_BIO(const BIO_METHOD *method = BIO_s_file()) + { bio = BIO_new(method); } + + ~PSSL_BIO() +@@ -627,9 +627,10 @@ + if (dh == NULL) + return; + +- dh->p = BN_bin2bn(pData, pSize, NULL); +- dh->g = BN_bin2bn(gData, gSize, NULL); +- if (dh->p != NULL && dh->g != NULL) ++ BIGNUM *p = BN_bin2bn(pData, pSize, NULL); ++ BIGNUM *g = BN_bin2bn(gData, gSize, NULL); ++ DH_set0_pqg(dh, p, NULL, g); ++ if (p != NULL && p != NULL) + return; + + DH_free(dh); +@@ -805,13 +806,11 @@ + SSL_METHOD * meth; + + switch (method) { +- case SSLv3: +- meth = SSLv3_method(); +- break; + case TLSv1: + meth = TLSv1_method(); + break; + case SSLv23: ++ case SSLv3: + default: + meth = SSLv23_method(); + break; +@@ -1117,7 +1116,7 @@ + // + + +-#define PSSLCHANNEL(bio) ((PSSLChannel *)(bio->ptr)) ++#define PSSLCHANNEL(bio) ((PSSLChannel *)BIO_get_data(bio)) + + extern "C" { + +@@ -1130,10 +1129,9 @@ + + static int Psock_new(BIO * bio) + { +- bio->init = 0; +- bio->num = 0; +- bio->ptr = NULL; // this is really (PSSLChannel *) +- bio->flags = 0; ++ BIO_set_init(bio, 0); ++ BIO_set_data(bio, NULL); ++ BIO_clear_flags(bio, ~0); + + return(1); + } +@@ -1144,13 +1142,13 @@ + if (bio == NULL) + return 0; + +- if (bio->shutdown) { +- if (bio->init) { ++ if (BIO_get_shutdown(bio)) { ++ if (BIO_get_init(bio)) { + PSSLCHANNEL(bio)->Shutdown(PSocket::ShutdownReadAndWrite); + PSSLCHANNEL(bio)->Close(); + } +- bio->init = 0; +- bio->flags = 0; ++ BIO_set_init(bio, 0); ++ BIO_clear_flags(bio, ~0); + } + return 1; + } +@@ -1160,11 +1158,11 @@ + { + switch (cmd) { + case BIO_CTRL_SET_CLOSE: +- bio->shutdown = (int)num; ++ BIO_set_shutdown(bio, (int)num); + return 1; + + case BIO_CTRL_GET_CLOSE: +- return bio->shutdown; ++ return BIO_get_shutdown(bio); + + case BIO_CTRL_FLUSH: + return 1; +@@ -1239,7 +1237,8 @@ + }; + + +-static BIO_METHOD methods_Psock = ++static BIO_METHOD *methods_Psock = NULL; ++/* + { + BIO_TYPE_SOCKET, + "PTLib-PSSLChannel", +@@ -1261,19 +1260,33 @@ + Psock_free + #endif + }; ++*/ + +- + PBoolean PSSLChannel::OnOpen() + { +- BIO * bio = BIO_new(&methods_Psock); ++ if (methods_Psock == NULL) { ++ methods_Psock = BIO_meth_new(BIO_TYPE_SOCKET | BIO_get_new_index(), "PTLib-PSSLChannel"); ++ if (methods_Psock == NULL || ++ BIO_meth_set_write(methods_Psock, Psock_write) || ++ BIO_meth_set_read(methods_Psock, Psock_read) || ++ BIO_meth_set_puts(methods_Psock, Psock_puts) || ++ BIO_meth_set_gets(methods_Psock, NULL) || ++ BIO_meth_set_ctrl(methods_Psock, Psock_ctrl) || ++ BIO_meth_set_create(methods_Psock, Psock_new) || ++ BIO_meth_set_destroy(methods_Psock, Psock_free)) { ++ SSLerr(SSL_F_SSL_SET_FD,ERR_R_BUF_LIB); ++ return PFalse; ++ } ++ } ++ BIO * bio = BIO_new(methods_Psock); + if (bio == NULL) { + SSLerr(SSL_F_SSL_SET_FD,ERR_R_BUF_LIB); + return PFalse; + } + + // "Open" then bio +- bio->ptr = this; +- bio->init = 1; ++ BIO_set_data(bio, this); ++ BIO_set_init(bio, 1); + + SSL_set_bio(ssl, bio, bio); + return PTrue;