From nobody Mon Feb 9 16:34:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+88627+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+88627+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1649416603; cv=none; d=zohomail.com; s=zohoarc; b=jBpkjD47mmu7vWkGqQ0qVhWbDsYOwcQSZBnHYvyCc8KFkoYSiC60Vd7pAHlKQtI9GPsHV1eQ6oTKpDHyIGsZ3V0NCIbyckG4i6P1//BQ+aic4i84IKKuokmNglldT+Jp0u4ZBQpXzHsRjDlnoHaikzu7yuiSvqOpcfNGRXWOFxo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649416603; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=UEUaLAdWm5ivXV7CCqxbY3xDEtwBduHVIhGRmZSHf20=; b=nDXsC+/GH+5FXG8EbSv8dRnqffzJTcLgOhf986rY9AXHjn/k564LS3Niw6c1OnLRbqmE4d7g3IXvAs5vVR3KBD/A9Nt2EcPIRIO1X4wD2uz9JH4aT922jSNNSwTe2x7aIpQxTZlI+5PjyzVJyHS7Zm9Ref0sFLjNvHPXvkBWMqM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+88627+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1649416603627427.1935441322105; Fri, 8 Apr 2022 04:16:43 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id lfwSYY1788612x90MebZrIBG; Fri, 08 Apr 2022 04:16:43 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web12.4669.1649416602677644268 for ; Fri, 08 Apr 2022 04:16:42 -0700 X-Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-671-DxogCKRHMkKDZKxE7isNcA-1; Fri, 08 Apr 2022 07:16:37 -0400 X-MC-Unique: DxogCKRHMkKDZKxE7isNcA-1 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7D4261C0AEEC; Fri, 8 Apr 2022 11:16:37 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E0B8407DEC5; Fri, 8 Apr 2022 11:16:37 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D2E15180098D; Fri, 8 Apr 2022 13:16:22 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Oliver Steffen , Jiewen Yao , Guomin Jiang , Jian J Wang , Xiaoyu Lu , Pawel Polawski , Gerd Hoffmann Subject: [edk2-devel] [PATCH v2 8/8] CryptoPkg/UnitTest: fix DH testcase Date: Fri, 8 Apr 2022 13:16:22 +0200 Message-Id: <20220408111622.3519517-9-kraxel@redhat.com> In-Reply-To: <20220408111622.3519517-1-kraxel@redhat.com> References: <20220408111622.3519517-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com X-Gm-Message-State: ivew7EIrn9md8ZYwp2SZ35Pex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1649416603; bh=nV0tXJ8bVnd8lVfskbwPfWP79/hzz1VM3nRTYaoz3qI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=gg/QBaJgJmURKNi36JReBvqxxb1Xx0uscUi7QfGF1jNvcJIlyVYL9uvpjraseQSsaGS gvrciHrHdFDKl/+4/CrpLu3YOpbKwNoYEKRhnhTt2YJ7MblH54BUM0pjfws434TTy14n4 ndAISaQC+yrXl9tEJZ9t2dXhFfu6dtSxCeM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1649416604926100003 Content-Type: text/plain; charset="utf-8"; x-default="true" openssl 3.0 wants at least 512 bytes, otherwise it throws an error: error:0280007E:Diffie-Hellman routines::modulus too small Signed-off-by: Gerd Hoffmann --- CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c b/Crypt= oPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c index 5cfe8d70535b..29e892a1514c 100644 --- a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c +++ b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c @@ -53,7 +53,7 @@ TestVerifyDhGenerateKey ( UNIT_TEST_CONTEXT Context ) { - UINT8 Prime[64]; + UINT8 Prime[512]; UINT8 PublicKey1[64]; UINTN PublicKey1Length; UINT8 PublicKey2[64]; @@ -72,10 +72,10 @@ TestVerifyDhGenerateKey ( Key1Length =3D sizeof (Key1); Key2Length =3D sizeof (Key2); =20 - Status =3D DhGenerateParameter (mDh1, 2, 64, Prime); + Status =3D DhGenerateParameter (mDh1, 2, sizeof (Prime), Prime); UT_ASSERT_TRUE (Status); =20 - Status =3D DhSetParameter (mDh2, 2, 64, Prime); + Status =3D DhSetParameter (mDh2, 2, sizeof (Prime), Prime); UT_ASSERT_TRUE (Status); =20 Status =3D DhGenerateKey (mDh1, PublicKey1, &PublicKey1Length); --=20 2.35.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#88627): https://edk2.groups.io/g/devel/message/88627 Mute This Topic: https://groups.io/mt/90333057/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-