From owner-svn-ports-all@freebsd.org Fri Nov 2 08:18:03 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 ACEA510ECF27; Fri, 2 Nov 2018 08:18:03 +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 517167C179; Fri, 2 Nov 2018 08:18:03 +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 2D02A27F83; Fri, 2 Nov 2018 08:18:03 +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 wA28I37N044142; Fri, 2 Nov 2018 08:18:03 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA28I2sC044139; Fri, 2 Nov 2018 08:18:02 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201811020818.wA28I2sC044139@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:18:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r483780 - in branches/2018Q4/security/pev: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: antoine X-SVN-Commit-Paths: in branches/2018Q4/security/pev: . files X-SVN-Commit-Revision: 483780 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:18:03 -0000 Author: antoine Date: Fri Nov 2 08:18:02 2018 New Revision: 483780 URL: https://svnweb.freebsd.org/changeset/ports/483780 Log: MFH: r482494 - Fix build after OpenSSL update on FreeBSD 12 PR: 232211 Submitted by: Nathan Added: branches/2018Q4/security/pev/files/patch-src_pehash.c - copied unchanged from r482494, head/security/pev/files/patch-src_pehash.c branches/2018Q4/security/pev/files/patch-src_pesec.c - copied unchanged from r482494, head/security/pev/files/patch-src_pesec.c Modified: branches/2018Q4/security/pev/Makefile Directory Properties: branches/2018Q4/ (props changed) Modified: branches/2018Q4/security/pev/Makefile ============================================================================== --- branches/2018Q4/security/pev/Makefile Fri Nov 2 08:15:05 2018 (r483779) +++ branches/2018Q4/security/pev/Makefile Fri Nov 2 08:18:02 2018 (r483780) @@ -3,6 +3,7 @@ PORTNAME= pev PORTVERSION= 0.80 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${PORTVERSION}/ Copied: branches/2018Q4/security/pev/files/patch-src_pehash.c (from r482494, head/security/pev/files/patch-src_pehash.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2018Q4/security/pev/files/patch-src_pehash.c Fri Nov 2 08:18:02 2018 (r483780, copy of r482494, head/security/pev/files/patch-src_pehash.c) @@ -0,0 +1,34 @@ +--- src/pehash.c.orig 2018-10-20 11:44:18 UTC ++++ src/pehash.c +@@ -215,13 +215,25 @@ static void calc_hash(const char *alg_name, const unsi + unsigned char md_value[EVP_MAX_MD_SIZE]; + unsigned int md_len; + +- EVP_MD_CTX md_ctx; ++ // See https://wiki.openssl.org/index.php/1.1_API_Changes ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ EVP_MD_CTX md_ctx_auto; ++ EVP_MD_CTX *md_ctx = &md_ctx_auto; ++#else ++ EVP_MD_CTX *md_ctx = EVP_MD_CTX_new(); ++#endif ++ + // FIXME: Handle errors - Check return values. +- EVP_MD_CTX_init(&md_ctx); +- EVP_DigestInit_ex(&md_ctx, md, NULL); +- EVP_DigestUpdate(&md_ctx, data, size); +- EVP_DigestFinal_ex(&md_ctx, md_value, &md_len); +- EVP_MD_CTX_cleanup(&md_ctx); ++ EVP_MD_CTX_init(md_ctx); ++ EVP_DigestInit_ex(md_ctx, md, NULL); ++ EVP_DigestUpdate(md_ctx, data, size); ++ EVP_DigestFinal_ex(md_ctx, md_value, &md_len); ++ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ EVP_MD_CTX_cleanup(md_ctx); ++#else ++ EVP_MD_CTX_free(md_ctx); ++#endif + + for (unsigned int i=0; i < md_len; i++) + sprintf(&output[i * 2], "%02x", md_value[i]); Copied: branches/2018Q4/security/pev/files/patch-src_pesec.c (from r482494, head/security/pev/files/patch-src_pesec.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2018Q4/security/pev/files/patch-src_pesec.c Fri Nov 2 08:18:02 2018 (r483780, copy of r482494, head/security/pev/files/patch-src_pesec.c) @@ -0,0 +1,12 @@ +--- src/pesec.c.orig 2018-10-20 11:48:33 UTC ++++ src/pesec.c +@@ -225,7 +225,9 @@ static int parse_pkcs7_data(const options_t *options, + PKCS7 *p7 = NULL; + BIO *in = NULL; + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + CRYPTO_malloc_init(); ++#endif + ERR_load_crypto_strings(); + OpenSSL_add_all_algorithms(); +