public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Yao, Jiewen" <jiewen.yao@intel.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Lu, XiaoyuX" <xiaoyux.lu@intel.com>,
	"Jiang, Guomin" <guomin.jiang@intel.com>
Subject: Re: [edk2-devel] [Patch v2][edk2-stable202011 4/4] CryptoPkg/Test/UnitTest/Library/BaseCryptLib: Fix MD5 Hash tests
Date: Wed, 25 Nov 2020 07:31:02 +0000	[thread overview]
Message-ID: <MWHPR11MB16476FA6E335659A137CC613F6FA0@MWHPR11MB1647.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201125050758.1507-5-michael.d.kinney@intel.com>

The patch would disable the MD5 test. Do we need to enable it in the test dsc?

Anyway, Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>

Thanks,
Zhichao

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael D
> Kinney
> Sent: Wednesday, November 25, 2020 1:08 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Lu, XiaoyuX <xiaoyux.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>
> Subject: [edk2-devel] [Patch v2][edk2-stable202011 4/4]
> CryptoPkg/Test/UnitTest/Library/BaseCryptLib: Fix MD5 Hash tests
> 
> Only include MD5 unit tests if ENABLE_MD5_DEPRECATED_INTERFACES is
> defined.
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Cc: Guomin Jiang <guomin.jiang@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c
> b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c
> index bc47c5736246..24919053324a 100644
> --- a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c
> +++ b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HashTests.c
> @@ -21,10 +21,11 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8
> *HashData = "abc";  //  // Result for MD5("abc"). (From "A.5 Test suite" of IETF
> RFC1321)  //
> +#ifdef ENABLE_MD5_DEPRECATED_INTERFACES
>  GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8
> Md5Digest[MD5_DIGEST_SIZE] = {
>    0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0, 0xd6, 0x96, 0x3f, 0x7d, 0x28,
> 0xe1, 0x7f, 0x72
> -
>    };
> +#endif
> 
>  //
>  // Result for SHA-1("abc"). (From "A.1 SHA-1 Example" of NIST FIPS 180-2) @@ -
> 107,7 +108,9 @@ typedef struct {
>    VOID                       *HashCtx;
>  } HASH_TEST_CONTEXT;
> 
> +#ifdef ENABLE_MD5_DEPRECATED_INTERFACES
>  HASH_TEST_CONTEXT       mMd5TestCtx    = {MD5_DIGEST_SIZE,
> Md5GetContextSize,    Md5Init,    Md5Update,    Md5Final,    Md5HashAll,
> Md5Digest};
> +#endif
>  HASH_TEST_CONTEXT       mSha1TestCtx   = {SHA1_DIGEST_SIZE,
> Sha1GetContextSize,   Sha1Init,   Sha1Update,   Sha1Final,   Sha1HashAll,
> Sha1Digest};
>  HASH_TEST_CONTEXT       mSha256TestCtx = {SHA256_DIGEST_SIZE,
> Sha256GetContextSize, Sha256Init, Sha256Update, Sha256Final, Sha256HashAll,
> Sha256Digest};
>  HASH_TEST_CONTEXT       mSha384TestCtx = {SHA384_DIGEST_SIZE,
> Sha384GetContextSize, Sha384Init, Sha384Update, Sha384Final, Sha384HashAll,
> Sha384Digest};
> @@ -187,7 +190,9 @@ TEST_DESC mHashTest[] = {
>      //
>      // -----Description----------------Class---------------------Function---------------
> Pre------------------Post------------Context
>      //
> +#ifdef ENABLE_MD5_DEPRECATED_INTERFACES
>      {"TestVerifyMd5()",    "CryptoPkg.BaseCryptLib.Hash",   TestVerifyHash,
> TestVerifyHashPreReq, TestVerifyHashCleanUp, &mMd5TestCtx},
> +#endif
>      {"TestVerifySha1()",   "CryptoPkg.BaseCryptLib.Hash",   TestVerifyHash,
> TestVerifyHashPreReq, TestVerifyHashCleanUp, &mSha1TestCtx},
>      {"TestVerifySha256()", "CryptoPkg.BaseCryptLib.Hash",   TestVerifyHash,
> TestVerifyHashPreReq, TestVerifyHashCleanUp, &mSha256TestCtx},
>      {"TestVerifySha384()", "CryptoPkg.BaseCryptLib.Hash",   TestVerifyHash,
> TestVerifyHashPreReq, TestVerifyHashCleanUp, &mSha384TestCtx},
> --
> 2.29.2.windows.2
> 
> 
> 
> 
> 


  reply	other threads:[~2020-11-25  7:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25  5:07 [Patch v2][edk2-stable202011 0/4] Address EDK II CI Failures Michael D Kinney
2020-11-25  5:07 ` [Patch v2][edk2-stable202011 1/4] .azurepipelines/templates/pr-gate-steps.yml: Fetch target branch Michael D Kinney
2020-11-25  5:07 ` [Patch v2][edk2-stable202011 2/4] .azurepipelines/templates/platform-build-run-steps.yml: " Michael D Kinney
2020-11-25  5:07 ` [Patch v2][edk2-stable202011 3/4] OvmfPkg/PlatformCI/.azurepiplines: Use stable release of QEMU Michael D Kinney
2020-11-25  8:01   ` [edk2-devel] " Philippe Mathieu-Daudé
2020-11-25 16:23     ` Michael D Kinney
2021-01-08  9:43       ` chocolatey.org instability [was: OvmfPkg/PlatformCI/.azurepiplines: Use stable release of QEMU] Laszlo Ersek
2020-11-25 14:11   ` [Patch v2][edk2-stable202011 3/4] OvmfPkg/PlatformCI/.azurepiplines: Use stable release of QEMU Laszlo Ersek
2020-11-25 14:57   ` [edk2-devel] " Rebecca Cran
2020-11-25 16:20     ` Michael D Kinney
2020-11-25 19:35       ` Rebecca Cran
2020-12-01  1:55         ` Michael D Kinney
2020-11-25  5:07 ` [Patch v2][edk2-stable202011 4/4] CryptoPkg/Test/UnitTest/Library/BaseCryptLib: Fix MD5 Hash tests Michael D Kinney
2020-11-25  7:31   ` Gao, Zhichao [this message]
2020-11-25 16:39     ` [edk2-devel] " Michael D Kinney
2020-11-25  8:27   ` Yao, Jiewen
2020-11-25  5:11 ` [edk2-devel] [Patch v2][edk2-stable202011 0/4] Address EDK II CI Failures Michael D Kinney
2020-11-25  5:31   ` 回复: " gaoliming
2020-11-25 18:16     ` Michael D Kinney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MWHPR11MB16476FA6E335659A137CC613F6FA0@MWHPR11MB1647.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox