Date: Fri, 2 Nov 2018 08:15:06 +0000 (UTC) From: Antoine Brodin <antoine@FreeBSD.org> 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 Message-ID: <201811020815.wA28F6OK043876@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <bsd.port.options.mk> + +.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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811020815.wA28F6OK043876>