From owner-svn-ports-all@freebsd.org Sun Oct 21 14:46:17 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 B2259FF4AB7; Sun, 21 Oct 2018 14:46:17 +0000 (UTC) (envelope-from cpm@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 6847F90AE7; Sun, 21 Oct 2018 14:46:17 +0000 (UTC) (envelope-from cpm@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 4536D6F27; Sun, 21 Oct 2018 14:46:17 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9LEkH8W075981; Sun, 21 Oct 2018 14:46:17 GMT (envelope-from cpm@FreeBSD.org) Received: (from cpm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9LEkGhO075980; Sun, 21 Oct 2018 14:46:16 GMT (envelope-from cpm@FreeBSD.org) Message-Id: <201810211446.w9LEkGhO075980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cpm set sender to cpm@FreeBSD.org using -f From: "Carlos J. Puga Medina" Date: Sun, 21 Oct 2018 14:46:16 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r482679 - in head/net-im/telegram: . files X-SVN-Group: ports-head X-SVN-Commit-Author: cpm X-SVN-Commit-Paths: in head/net-im/telegram: . files X-SVN-Commit-Revision: 482679 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: Sun, 21 Oct 2018 14:46:18 -0000 Author: cpm Date: Sun Oct 21 14:46:16 2018 New Revision: 482679 URL: https://svnweb.freebsd.org/changeset/ports/482679 Log: 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: head/net-im/telegram/files/extra-patch-openssl-1.1.0 (contents, props changed) Modified: head/net-im/telegram/Makefile Modified: head/net-im/telegram/Makefile ============================================================================== --- head/net-im/telegram/Makefile Sun Oct 21 14:43:53 2018 (r482678) +++ head/net-im/telegram/Makefile Sun Oct 21 14:46:16 2018 (r482679) @@ -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 Added: head/net-im/telegram/files/extra-patch-openssl-1.1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-im/telegram/files/extra-patch-openssl-1.1.0 Sun Oct 21 14:46:16 2018 (r482679) @@ -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);