* [PATCH v3 0/1] CryptoPkg bug fix @ 2022-11-07 20:02 Judah Vang 2022-11-07 20:02 ` [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors Judah Vang 0 siblings, 1 reply; 5+ messages in thread From: Judah Vang @ 2022-11-07 20:02 UTC (permalink / raw) To: devel https://bugzilla.tianocore.org/show_bug.cgi?id=3991 There is a #define to deprecate Sha1 functions but not all the Sha1 function are wrapped around this #define causing a build error. The fix is to wrap all Sha1 functions with the #define. Judah Vang (1): CryptoPkg: Sha1 functions causing build errors CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- 2.35.1.windows.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors 2022-11-07 20:02 [PATCH v3 0/1] CryptoPkg bug fix Judah Vang @ 2022-11-07 20:02 ` Judah Vang 2022-11-08 1:26 ` [edk2-stable202211] " Yao, Jiewen 0 siblings, 1 reply; 5+ messages in thread From: Judah Vang @ 2022-11-07 20:02 UTC (permalink / raw) To: devel; +Cc: Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang, Nishant C Mistry REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3991 Fix build issue when DiSABLE_SHA1_DEPRECATED_INTERFACES is defined. Percolate the #ifndef DiSABLE_SHA1_DEPRECATED_INTERFACES to all the Sha1 functions. 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> Cc: Nishant C Mistry <nishant.c.mistry@intel.com> Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Nishant C Mistry <nishant.c.mistry@intel.com> Signed-off-by: Judah Vang <judah.vang@intel.com> --- CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c b/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c index f9796b215865..ede9fa8c09ec 100644 --- a/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c +++ b/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c @@ -6,7 +6,7 @@ This API, when called, will calculate the Hash using the hashing algorithm specified by PcdHashApiLibPolicy. - Copyright (c) 2020, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2020-2022, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -33,9 +33,11 @@ HashApiGetContextSize ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1GetContextSize (); break; + #endif case HASH_ALG_SHA256: return Sha256GetContextSize (); @@ -75,9 +77,11 @@ HashApiInit ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1Init (HashContext); break; + #endif case HASH_ALG_SHA256: return Sha256Init (HashContext); @@ -119,9 +123,11 @@ HashApiDuplicate ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1Duplicate (HashContext, NewHashContext); break; + #endif case HASH_ALG_SHA256: return Sha256Duplicate (HashContext, NewHashContext); @@ -165,9 +171,11 @@ HashApiUpdate ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1Update (HashContext, DataToHash, DataToHashLen); break; + #endif case HASH_ALG_SHA256: return Sha256Update (HashContext, DataToHash, DataToHashLen); @@ -209,9 +217,11 @@ HashApiFinal ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1Final (HashContext, Digest); break; + #endif case HASH_ALG_SHA256: return Sha256Final (HashContext, Digest); @@ -255,9 +265,11 @@ HashApiHashAll ( ) { switch (PcdGet32 (PcdHashApiLibPolicy)) { + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES case HASH_ALG_SHA1: return Sha1HashAll (DataToHash, DataToHashLen, Digest); break; + #endif case HASH_ALG_SHA256: return Sha256HashAll (DataToHash, DataToHashLen, Digest); -- 2.35.1.windows.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [edk2-stable202211] [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors 2022-11-07 20:02 ` [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors Judah Vang @ 2022-11-08 1:26 ` Yao, Jiewen 2022-11-08 1:57 ` Michael D Kinney 0 siblings, 1 reply; 5+ messages in thread From: Yao, Jiewen @ 2022-11-08 1:26 UTC (permalink / raw) To: Vang, Judah, devel@edk2.groups.io Cc: Wang, Jian J, Xiaoyu Lu, Jiang, Guomin, Mistry, Nishant C Hello I suggest we add this to edk2-stable202211, since this is an important bug fix. The V1 and V2 patch are sent before soft freeze. V3 patch splits V2. Thank you Yao Jiewen > -----Original Message----- > From: Vang, Judah <judah.vang@intel.com> > Sent: Tuesday, November 8, 2022 4:02 AM > To: devel@edk2.groups.io > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J > <jian.j.wang@intel.com>; Xiaoyu Lu <xiaoyux.lu@intel.com>; Jiang, Guomin > <guomin.jiang@intel.com>; Mistry, Nishant C <nishant.c.mistry@intel.com> > Subject: [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3991 > > Fix build issue when DiSABLE_SHA1_DEPRECATED_INTERFACES > is defined. Percolate the #ifndef DiSABLE_SHA1_DEPRECATED_INTERFACES > to all the Sha1 functions. > > 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> > Cc: Nishant C Mistry <nishant.c.mistry@intel.com> > Signed-off-by: Jian J Wang <jian.j.wang@intel.com> > Signed-off-by: Nishant C Mistry <nishant.c.mistry@intel.com> > Signed-off-by: Judah Vang <judah.vang@intel.com> > --- > CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c | 14 > +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > b/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > index f9796b215865..ede9fa8c09ec 100644 > --- a/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > +++ b/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > @@ -6,7 +6,7 @@ > This API, when called, will calculate the Hash using the > hashing algorithm specified by PcdHashApiLibPolicy. > > - Copyright (c) 2020, Intel Corporation. All rights reserved.<BR> > + Copyright (c) 2020-2022, Intel Corporation. All rights reserved.<BR> > SPDX-License-Identifier: BSD-2-Clause-Patent > > **/ > @@ -33,9 +33,11 @@ HashApiGetContextSize ( > ) > { > switch (PcdGet32 (PcdHashApiLibPolicy)) { > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > case HASH_ALG_SHA1: > return Sha1GetContextSize (); > break; > + #endif > > case HASH_ALG_SHA256: > return Sha256GetContextSize (); > @@ -75,9 +77,11 @@ HashApiInit ( > ) > { > switch (PcdGet32 (PcdHashApiLibPolicy)) { > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > case HASH_ALG_SHA1: > return Sha1Init (HashContext); > break; > + #endif > > case HASH_ALG_SHA256: > return Sha256Init (HashContext); > @@ -119,9 +123,11 @@ HashApiDuplicate ( > ) > { > switch (PcdGet32 (PcdHashApiLibPolicy)) { > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > case HASH_ALG_SHA1: > return Sha1Duplicate (HashContext, NewHashContext); > break; > + #endif > > case HASH_ALG_SHA256: > return Sha256Duplicate (HashContext, NewHashContext); > @@ -165,9 +171,11 @@ HashApiUpdate ( > ) > { > switch (PcdGet32 (PcdHashApiLibPolicy)) { > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > case HASH_ALG_SHA1: > return Sha1Update (HashContext, DataToHash, DataToHashLen); > break; > + #endif > > case HASH_ALG_SHA256: > return Sha256Update (HashContext, DataToHash, DataToHashLen); > @@ -209,9 +217,11 @@ HashApiFinal ( > ) > { > switch (PcdGet32 (PcdHashApiLibPolicy)) { > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > case HASH_ALG_SHA1: > return Sha1Final (HashContext, Digest); > break; > + #endif > > case HASH_ALG_SHA256: > return Sha256Final (HashContext, Digest); > @@ -255,9 +265,11 @@ HashApiHashAll ( > ) > { > switch (PcdGet32 (PcdHashApiLibPolicy)) { > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > case HASH_ALG_SHA1: > return Sha1HashAll (DataToHash, DataToHashLen, Digest); > break; > + #endif > > case HASH_ALG_SHA256: > return Sha256HashAll (DataToHash, DataToHashLen, Digest); > -- > 2.35.1.windows.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-stable202211] [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors 2022-11-08 1:26 ` [edk2-stable202211] " Yao, Jiewen @ 2022-11-08 1:57 ` Michael D Kinney 2022-11-08 5:58 ` Yao, Jiewen 0 siblings, 1 reply; 5+ messages in thread From: Michael D Kinney @ 2022-11-08 1:57 UTC (permalink / raw) To: devel@edk2.groups.io, Yao, Jiewen, Vang, Judah, Kinney, Michael D Cc: Wang, Jian J, Xiaoyu Lu, Jiang, Guomin, Mistry, Nishant C I agree. Mike > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao, Jiewen > Sent: Monday, November 7, 2022 5:26 PM > To: Vang, Judah <judah.vang@intel.com>; devel@edk2.groups.io > Cc: Wang, Jian J <jian.j.wang@intel.com>; Xiaoyu Lu <xiaoyux.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>; Mistry, > Nishant C <nishant.c.mistry@intel.com> > Subject: [edk2-devel] [edk2-stable202211] [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors > > Hello > I suggest we add this to edk2-stable202211, since this is an important bug fix. > > The V1 and V2 patch are sent before soft freeze. > V3 patch splits V2. > > > Thank you > Yao Jiewen > > > > -----Original Message----- > > From: Vang, Judah <judah.vang@intel.com> > > Sent: Tuesday, November 8, 2022 4:02 AM > > To: devel@edk2.groups.io > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J > > <jian.j.wang@intel.com>; Xiaoyu Lu <xiaoyux.lu@intel.com>; Jiang, Guomin > > <guomin.jiang@intel.com>; Mistry, Nishant C <nishant.c.mistry@intel.com> > > Subject: [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3991 > > > > Fix build issue when DiSABLE_SHA1_DEPRECATED_INTERFACES > > is defined. Percolate the #ifndef DiSABLE_SHA1_DEPRECATED_INTERFACES > > to all the Sha1 functions. > > > > 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> > > Cc: Nishant C Mistry <nishant.c.mistry@intel.com> > > Signed-off-by: Jian J Wang <jian.j.wang@intel.com> > > Signed-off-by: Nishant C Mistry <nishant.c.mistry@intel.com> > > Signed-off-by: Judah Vang <judah.vang@intel.com> > > --- > > CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c | 14 > > +++++++++++++- > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > > diff --git a/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > > b/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > > index f9796b215865..ede9fa8c09ec 100644 > > --- a/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > > +++ b/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > > @@ -6,7 +6,7 @@ > > This API, when called, will calculate the Hash using the > > hashing algorithm specified by PcdHashApiLibPolicy. > > > > - Copyright (c) 2020, Intel Corporation. All rights reserved.<BR> > > + Copyright (c) 2020-2022, Intel Corporation. All rights reserved.<BR> > > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > **/ > > @@ -33,9 +33,11 @@ HashApiGetContextSize ( > > ) > > { > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > case HASH_ALG_SHA1: > > return Sha1GetContextSize (); > > break; > > + #endif > > > > case HASH_ALG_SHA256: > > return Sha256GetContextSize (); > > @@ -75,9 +77,11 @@ HashApiInit ( > > ) > > { > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > case HASH_ALG_SHA1: > > return Sha1Init (HashContext); > > break; > > + #endif > > > > case HASH_ALG_SHA256: > > return Sha256Init (HashContext); > > @@ -119,9 +123,11 @@ HashApiDuplicate ( > > ) > > { > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > case HASH_ALG_SHA1: > > return Sha1Duplicate (HashContext, NewHashContext); > > break; > > + #endif > > > > case HASH_ALG_SHA256: > > return Sha256Duplicate (HashContext, NewHashContext); > > @@ -165,9 +171,11 @@ HashApiUpdate ( > > ) > > { > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > case HASH_ALG_SHA1: > > return Sha1Update (HashContext, DataToHash, DataToHashLen); > > break; > > + #endif > > > > case HASH_ALG_SHA256: > > return Sha256Update (HashContext, DataToHash, DataToHashLen); > > @@ -209,9 +217,11 @@ HashApiFinal ( > > ) > > { > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > case HASH_ALG_SHA1: > > return Sha1Final (HashContext, Digest); > > break; > > + #endif > > > > case HASH_ALG_SHA256: > > return Sha256Final (HashContext, Digest); > > @@ -255,9 +265,11 @@ HashApiHashAll ( > > ) > > { > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > case HASH_ALG_SHA1: > > return Sha1HashAll (DataToHash, DataToHashLen, Digest); > > break; > > + #endif > > > > case HASH_ALG_SHA256: > > return Sha256HashAll (DataToHash, DataToHashLen, Digest); > > -- > > 2.35.1.windows.2 > > > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-stable202211] [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors 2022-11-08 1:57 ` Michael D Kinney @ 2022-11-08 5:58 ` Yao, Jiewen 0 siblings, 0 replies; 5+ messages in thread From: Yao, Jiewen @ 2022-11-08 5:58 UTC (permalink / raw) To: Kinney, Michael D, devel@edk2.groups.io, Vang, Judah Cc: Wang, Jian J, Xiaoyu Lu, Jiang, Guomin, Mistry, Nishant C Thank you. Merged https://github.com/tianocore/edk2/pull/3612 > -----Original Message----- > From: Kinney, Michael D <michael.d.kinney@intel.com> > Sent: Tuesday, November 8, 2022 9:58 AM > To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>; Vang, > Judah <judah.vang@intel.com>; Kinney, Michael D > <michael.d.kinney@intel.com> > Cc: Wang, Jian J <jian.j.wang@intel.com>; Xiaoyu Lu > <xiaoyux.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>; Mistry, > Nishant C <nishant.c.mistry@intel.com> > Subject: RE: [edk2-stable202211] [PATCH v3 1/1] CryptoPkg: Sha1 > functions causing build errors > > I agree. > > Mike > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao, > Jiewen > > Sent: Monday, November 7, 2022 5:26 PM > > To: Vang, Judah <judah.vang@intel.com>; devel@edk2.groups.io > > Cc: Wang, Jian J <jian.j.wang@intel.com>; Xiaoyu Lu > <xiaoyux.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>; Mistry, > > Nishant C <nishant.c.mistry@intel.com> > > Subject: [edk2-devel] [edk2-stable202211] [PATCH v3 1/1] CryptoPkg: > Sha1 functions causing build errors > > > > Hello > > I suggest we add this to edk2-stable202211, since this is an important > bug fix. > > > > The V1 and V2 patch are sent before soft freeze. > > V3 patch splits V2. > > > > > > Thank you > > Yao Jiewen > > > > > > > -----Original Message----- > > > From: Vang, Judah <judah.vang@intel.com> > > > Sent: Tuesday, November 8, 2022 4:02 AM > > > To: devel@edk2.groups.io > > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J > > > <jian.j.wang@intel.com>; Xiaoyu Lu <xiaoyux.lu@intel.com>; Jiang, > Guomin > > > <guomin.jiang@intel.com>; Mistry, Nishant C > <nishant.c.mistry@intel.com> > > > Subject: [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors > > > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3991 > > > > > > Fix build issue when DiSABLE_SHA1_DEPRECATED_INTERFACES > > > is defined. Percolate the #ifndef > DiSABLE_SHA1_DEPRECATED_INTERFACES > > > to all the Sha1 functions. > > > > > > 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> > > > Cc: Nishant C Mistry <nishant.c.mistry@intel.com> > > > Signed-off-by: Jian J Wang <jian.j.wang@intel.com> > > > Signed-off-by: Nishant C Mistry <nishant.c.mistry@intel.com> > > > Signed-off-by: Judah Vang <judah.vang@intel.com> > > > --- > > > CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c | 14 > > > +++++++++++++- > > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > > > > diff --git a/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > > > b/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > > > index f9796b215865..ede9fa8c09ec 100644 > > > --- a/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > > > +++ b/CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c > > > @@ -6,7 +6,7 @@ > > > This API, when called, will calculate the Hash using the > > > hashing algorithm specified by PcdHashApiLibPolicy. > > > > > > - Copyright (c) 2020, Intel Corporation. All rights reserved.<BR> > > > + Copyright (c) 2020-2022, Intel Corporation. All rights reserved.<BR> > > > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > > **/ > > > @@ -33,9 +33,11 @@ HashApiGetContextSize ( > > > ) > > > { > > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > > case HASH_ALG_SHA1: > > > return Sha1GetContextSize (); > > > break; > > > + #endif > > > > > > case HASH_ALG_SHA256: > > > return Sha256GetContextSize (); > > > @@ -75,9 +77,11 @@ HashApiInit ( > > > ) > > > { > > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > > case HASH_ALG_SHA1: > > > return Sha1Init (HashContext); > > > break; > > > + #endif > > > > > > case HASH_ALG_SHA256: > > > return Sha256Init (HashContext); > > > @@ -119,9 +123,11 @@ HashApiDuplicate ( > > > ) > > > { > > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > > case HASH_ALG_SHA1: > > > return Sha1Duplicate (HashContext, NewHashContext); > > > break; > > > + #endif > > > > > > case HASH_ALG_SHA256: > > > return Sha256Duplicate (HashContext, NewHashContext); > > > @@ -165,9 +171,11 @@ HashApiUpdate ( > > > ) > > > { > > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > > case HASH_ALG_SHA1: > > > return Sha1Update (HashContext, DataToHash, DataToHashLen); > > > break; > > > + #endif > > > > > > case HASH_ALG_SHA256: > > > return Sha256Update (HashContext, DataToHash, DataToHashLen); > > > @@ -209,9 +217,11 @@ HashApiFinal ( > > > ) > > > { > > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > > case HASH_ALG_SHA1: > > > return Sha1Final (HashContext, Digest); > > > break; > > > + #endif > > > > > > case HASH_ALG_SHA256: > > > return Sha256Final (HashContext, Digest); > > > @@ -255,9 +265,11 @@ HashApiHashAll ( > > > ) > > > { > > > switch (PcdGet32 (PcdHashApiLibPolicy)) { > > > + #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES > > > case HASH_ALG_SHA1: > > > return Sha1HashAll (DataToHash, DataToHashLen, Digest); > > > break; > > > + #endif > > > > > > case HASH_ALG_SHA256: > > > return Sha256HashAll (DataToHash, DataToHashLen, Digest); > > > -- > > > 2.35.1.windows.2 > > > > > > > > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-08 5:58 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-11-07 20:02 [PATCH v3 0/1] CryptoPkg bug fix Judah Vang 2022-11-07 20:02 ` [PATCH v3 1/1] CryptoPkg: Sha1 functions causing build errors Judah Vang 2022-11-08 1:26 ` [edk2-stable202211] " Yao, Jiewen 2022-11-08 1:57 ` Michael D Kinney 2022-11-08 5:58 ` Yao, Jiewen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox