diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2022-04-11 19:24:57 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-04-12 14:39:01 +0000 |
commit | f5508a91e306dd183ab971be438b9667c9890a1d (patch) | |
tree | d55edde3b9e7dd35edb80f170224485aeec19699 /CryptoPkg | |
parent | fab6285a73c4c73bb131792d0afb20be369082d1 (diff) | |
download | edk2-f5508a91e306dd183ab971be438b9667c9890a1d.tar.gz |
CryptoPkg/UnitTest: fix DH testcase
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 <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Diffstat (limited to 'CryptoPkg')
-rw-r--r-- | CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/DhTests.c index 5cfe8d7053..29e892a151 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 = sizeof (Key1);
Key2Length = sizeof (Key2);
- Status = DhGenerateParameter (mDh1, 2, 64, Prime);
+ Status = DhGenerateParameter (mDh1, 2, sizeof (Prime), Prime);
UT_ASSERT_TRUE (Status);
- Status = DhSetParameter (mDh2, 2, 64, Prime);
+ Status = DhSetParameter (mDh2, 2, sizeof (Prime), Prime);
UT_ASSERT_TRUE (Status);
Status = DhGenerateKey (mDh1, PublicKey1, &PublicKey1Length);
|