From owner-svn-ports-all@freebsd.org Fri Nov 2 08:15:07 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 D610D10ECE63; Fri, 2 Nov 2018 08:15:06 +0000 (UTC) (envelope-from antoine@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 858317C040; Fri, 2 Nov 2018 08:15:06 +0000 (UTC) (envelope-from antoine@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 64E9C27F7E; Fri, 2 Nov 2018 08:15:06 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA28F6PD043878; Fri, 2 Nov 2018 08:15:06 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA28F6OK043876; Fri, 2 Nov 2018 08:15:06 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201811020815.wA28F6OK043876@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Fri, 2 Nov 2018 08:15:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r483779 - in branches/2018Q4/net-im/telegram: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: antoine X-SVN-Commit-Paths: in branches/2018Q4/net-im/telegram: . files X-SVN-Commit-Revision: 483779 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, 02 Nov 2018 08:15:07 -0000 Author: antoine Date: Fri Nov 2 08:15:05 2018 New Revision: 483779 URL: https://svnweb.freebsd.org/changeset/ports/483779 Log: MFH: r482679 net-im/telegram: Unbreak build on 12.0-CURRENT Add extra-patch to fix build on 12.0-CURRENT after updating OpenSSL to version 1.1.1 See https://github.com/vysheng/tgl/issues/129 Added: branches/2018Q4/net-im/telegram/files/extra-patch-openssl-1.1.0 - copied unchanged from r482679, head/net-im/telegram/files/extra-patch-openssl-1.1.0 Modified: branches/2018Q4/net-im/telegram/Makefile Directory Properties: branches/2018Q4/ (props changed) Modified: branches/2018Q4/net-im/telegram/Makefile ============================================================================== --- branches/2018Q4/net-im/telegram/Makefile Fri Nov 2 08:12:20 2018 (r483778) +++ branches/2018Q4/net-im/telegram/Makefile Fri Nov 2 08:15:05 2018 (r483779) @@ -35,6 +35,12 @@ PORTDOCS= * OPTIONS_DEFINE= DOCS +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200085 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-openssl-1.1.0 +.endif + do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/etc/telegram-cli ${INSTALL_PROGRAM} ${WRKSRC}/bin/telegram-cli ${STAGEDIR}${PREFIX}/bin Copied: branches/2018Q4/net-im/telegram/files/extra-patch-openssl-1.1.0 (from r482679, head/net-im/telegram/files/extra-patch-openssl-1.1.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2018Q4/net-im/telegram/files/extra-patch-openssl-1.1.0 Fri Nov 2 08:15:05 2018 (r483779, copy of r482679, head/net-im/telegram/files/extra-patch-openssl-1.1.0) @@ -0,0 +1,38 @@ +--- tgl/crypto/rsa_pem_openssl.c.orig 2018-10-21 14:25:36 UTC ++++ tgl/crypto/rsa_pem_openssl.c +@@ -36,18 +36,28 @@ TGLC_WRAPPER_ASSOC(rsa,RSA) + // TODO: Refactor crucial struct-identity into its own header. + TGLC_WRAPPER_ASSOC(bn,BIGNUM) + ++/* ++ * Note: Since OpenSSL version 1.1.0-pre5 the RSA struct (rsa_st) is opaque, ++ * see https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes ++ */ + TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) { + RSA *ret = RSA_new (); +- ret->e = unwrap_bn (TGLC_bn_new ()); +- TGLC_bn_set_word (wrap_bn (ret->e), e); +- ret->n = unwrap_bn (TGLC_bn_bin2bn (n, n_bytes, NULL)); ++ BIGNUM *ret_e = unwrap_bn (TGLC_bn_new ()); ++ BIGNUM *ret_n = unwrap_bn (TGLC_bn_bin2bn (n, n_bytes, NULL)); ++ RSA_set0_key (ret, ret_n, ret_e, NULL); ++ TGLC_bn_set_word (wrap_bn (ret_e), e); + return wrap_rsa (ret); + } + +-#define RSA_GETTER(M) \ +- TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \ +- return wrap_bn (unwrap_rsa (key)->M); \ +- } \ ++#define RSA_GETTER(M) \ ++TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \ ++ BIGNUM *rsa_n, *rsa_e, *rsa_d; \ ++ RSA_get0_key(unwrap_rsa (key), \ ++ (const BIGNUM **) &rsa_n, \ ++ (const BIGNUM **) &rsa_e, \ ++ (const BIGNUM **) &rsa_d); \ ++ return wrap_bn (rsa_ ## M); \ ++} + + RSA_GETTER(n); + RSA_GETTER(e);