From owner-svn-ports-all@freebsd.org Wed Nov 11 03:13:37 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D13792D3374; Wed, 11 Nov 2020 03:13:37 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CW8vP5c7Nz3lSv; Wed, 11 Nov 2020 03:13:37 +0000 (UTC) (envelope-from danfe@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 A8CE65ACF; Wed, 11 Nov 2020 03:13:37 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0AB3DbvP057650; Wed, 11 Nov 2020 03:13:37 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0AB3Dbq0057649; Wed, 11 Nov 2020 03:13:37 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <202011110313.0AB3Dbq0057649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Wed, 11 Nov 2020 03:13:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r554868 - head/security/rhash/files X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: head/security/rhash/files X-SVN-Commit-Revision: 554868 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.34 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: Wed, 11 Nov 2020 03:13:37 -0000 Author: danfe Date: Wed Nov 11 03:13:37 2020 New Revision: 554868 URL: https://svnweb.freebsd.org/changeset/ports/554868 Log: Unbreak the build against OpenSSL without MD4 support. PR: 250578 Added: head/security/rhash/files/patch-librhash_plug__openssl.c (contents, props changed) Added: head/security/rhash/files/patch-librhash_plug__openssl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/rhash/files/patch-librhash_plug__openssl.c Wed Nov 11 03:13:37 2020 (r554868) @@ -0,0 +1,60 @@ +--- librhash/plug_openssl.c.orig 2019-12-14 16:52:11 UTC ++++ librhash/plug_openssl.c +@@ -18,10 +18,15 @@ + #include + #include + #include +-#include + #include + #include + ++#ifndef OPENSSL_NO_MD4 ++# include ++# define PLUGIN_MD4 RHASH_MD4 ++#else ++# define PLUGIN_MD4 0 ++#endif + #ifndef OPENSSL_NO_RIPEMD + # include + # define PLUGIN_RIPEMD160 RHASH_RIPEMD160 +@@ -48,7 +53,7 @@ + + #define OPENSSL_DEFAULT_HASH_MASK (RHASH_MD5 | RHASH_SHA1 | \ + RHASH_SHA224 | RHASH_SHA256 | RHASH_SHA384 | RHASH_SHA512) +-#define PLUGIN_SUPPORTED_HASH_MASK (RHASH_MD4 | RHASH_MD5 | RHASH_SHA1 | \ ++#define PLUGIN_SUPPORTED_HASH_MASK (PLUGIN_MD4 | RHASH_MD5 | RHASH_SHA1 | \ + RHASH_SHA224 | RHASH_SHA256 | RHASH_SHA384 | RHASH_SHA512 | \ + PLUGIN_RIPEMD160 | PLUGIN_WHIRLPOOL) + +@@ -89,7 +94,9 @@ OS_METHOD(WHIRLPOOL); + CALL_FINAL(name, result, (CTX_TYPE*)ctx); \ + } + ++#ifndef OPENSSL_NO_MD4 + WRAP_FINAL(MD4) ++#endif + WRAP_FINAL(MD5) + WRAP_FINAL2(SHA1, SHA_CTX) + WRAP_FINAL2(SHA224, SHA256_CTX) +@@ -114,7 +121,11 @@ rhash_info info_sslwhpl = { RHASH_WHIRLPOOL, 0, 64, "W + + /* The table of supported OpenSSL hash functions */ + rhash_hash_info rhash_openssl_methods[] = { ++#ifndef OPENSSL_NO_MD4 + { &info_md4, sizeof(MD4_CTX), offsetof(MD4_CTX, A), HASH_INFO_METHODS(MD4) }, /* 128 bit */ ++#else ++ { 0, 0, 0, 0, 0, 0, 0}, ++#endif + { &info_md5, sizeof(MD5_CTX), offsetof(MD5_CTX, A), HASH_INFO_METHODS(MD5) }, /* 128 bit */ + { &info_sha1, sizeof(SHA_CTX), offsetof(SHA_CTX, h0), HASH_INFO_METHODS(SHA1) }, /* 160 bit */ + { &info_sha224, sizeof(SHA256_CTX), offsetof(SHA256_CTX, h), HASH_INFO_METHODS(SHA224) }, /* 224 bit */ +@@ -187,7 +198,9 @@ static int load_openssl_runtime(void) + + if (handle == NULL) return 0; /* could not load OpenSSL */ + ++#ifndef OPENSSL_NO_MD4 + LOAD_ADDR(0, MD4) ++#endif + LOAD_ADDR(1, MD5); + LOAD_ADDR(2, SHA1); + LOAD_ADDR(3, SHA224);