From nobody Mon Jul 29 20:39:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WXqwK1vB5z5RxLB; Mon, 29 Jul 2024 20:39:29 +0000 (UTC) (envelope-from git@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WXqwK1PpLz4lBS; Mon, 29 Jul 2024 20:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722285569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dyT5ClVwxNh9QnqdW0ud0lTtIVkpTVeeBtCuyMcEOtA=; b=XBVIFIH/kxSsHaXC6VnNPkUw8o9EpOgVxSCHTwXjh4dCCmxyqqx1RErq1M1kEEUxxBTBcm T3Sr5au9dJSkJurIUDinIOKEcqIKK4/w9INnymsOi6gkxJnrTWgaCE2gUdYgci+d/bBkwZ EPl+4tQAoKp/6+WcS4BIYHe1ERM6S9uA4MW5f1DWISNNMtnJ6ViOjqhclscwTUoI4qNpp6 rvw5PaUWolo1igGSFPk2tKdSaencKmf2MlaSrdVZVsPfpS3U347VoxwyHMdyKRt123zOTO p8Kq1R8KylF6ujWwdru4hWYIF/ihqctsdWUd2dggWzKzDYNsci6ofssQc6i0JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722285569; a=rsa-sha256; cv=none; b=QKltvptVsYPpVghBwEmAWojw9n0UU7ddqU3oXv3UaA8CNo/DN5RMqdqhhNzzCQX4o3ccp1 aBgyT+KG+TcjDmOV3sjYFQhh8bwYtp0/PeIrcb0HnFBZvg5hw2R2nDLu7FWY8rRd0XqqyV gngYcjcTYLzVR7BujTIe3IyyF/hM5SwOPyJYiCQuuI0W89LQ3F1m2HglDX3bnTz5wz6zY+ ed8cj7ea5X0FEW1zF+egtlfsbS4LYtIUkRwXdxQp+0VQJxEPXqV8WPuBWdqGGeWvoI75wO YoejCkgyK7aQcTQEjZ8dTquGtEKWTguICIjPKAhrv9r2uXERi/EHKhvJGW98Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722285569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dyT5ClVwxNh9QnqdW0ud0lTtIVkpTVeeBtCuyMcEOtA=; b=Bv1j9jxzv/UWHF0tYcueG53sCXB9KERF2g27zRxZ7ngv+2vPdJDL6vELELZNtW008BMXwS e1aOM2CyuEmTifge5s4PfLwLNHOmdwA09GblDGpOIbaQMQxu7kEFI3LJg9fBdxdfRO1+cV VvBTzhLAetUaFBnE8hXlq8ZPyrp4qfCoW6cXO6M22XEFWQva/3YJ2ewchUMNPPDjOf+Wjh kaxZvGzZtEjZbal1L4JontpNMJXnUY4XALQByyCb/dwp95TkevsrMztOM2dGFrFiYqxioD zRCaPBEnQzpt69hxNPJl+JfAGzt+YzHoggq25QbbNdthoJGPV2jg2ZMS1EJJ4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WXqwK0ft3zprD; Mon, 29 Jul 2024 20:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46TKdS0d013201; Mon, 29 Jul 2024 20:39:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46TKdS2u013198; Mon, 29 Jul 2024 20:39:28 GMT (envelope-from git) Date: Mon, 29 Jul 2024 20:39:28 GMT Message-Id: <202407292039.46TKdS2u013198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 0244e0a177a6 - main - openssl: Add include for getrandom() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0244e0a177a68fc8ff7e8a58fa7a9553956232ec Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0244e0a177a68fc8ff7e8a58fa7a9553956232ec commit 0244e0a177a68fc8ff7e8a58fa7a9553956232ec Author: John Baldwin AuthorDate: 2024-07-29 20:38:49 +0000 Commit: John Baldwin CommitDate: 2024-07-29 20:38:49 +0000 openssl: Add include for getrandom() GCC 14 (but not earlier versions) warns about a missing prototype for getrandom(). Include explicitly to bring in the prototype rather than depending on a nested include. While here, stop defining sysctl_random() since it is no longer used. Reviewed by: brooks Fixes: 838b6caababb openssl: use getrandom(2) instead of probing for getentropy(2) Differential Revision: https://reviews.freebsd.org/D45995 --- crypto/openssl/providers/implementations/rands/seeding/rand_unix.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c index eadacedbe40c..f8e73a02daf4 100644 --- a/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c +++ b/crypto/openssl/providers/implementations/rands/seeding/rand_unix.c @@ -28,7 +28,7 @@ # include # endif #endif -#if (defined(__FreeBSD__) || defined(__NetBSD__)) && !defined(OPENSSL_SYS_UEFI) +#if defined(__NetBSD__) # include # include # include @@ -36,7 +36,8 @@ #if defined(__OpenBSD__) # include #endif -#if defined(__DragonFly__) +#if (defined(__DragonFly__) || defined(__FreeBSD__)) \ + && !defined(OPENSSL_SYS_UEFI) # include # include #endif @@ -212,7 +213,7 @@ void ossl_rand_pool_keep_random_devices_open(int keep) # error "librandom not (yet) supported" # endif -# if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND) +# if defined(__NetBSD__) && defined(KERN_ARND) /* * sysctl_random(): Use sysctl() to read a random number from the kernel * Returns the number of bytes returned in buf on success, -1 on failure.