audk/CryptoPkg/Library/BaseCryptLib/Pk
Michael Kubacki 84d77d9bf5 CryptoPkg: Fix conditionally uninitialized variable
Fixes CodeQL alerts for CWE-457:
https://cwe.mitre.org/data/definitions/457.html

Checks the return value from `ASN1_get_object()` to verify values
set by the function are valid.

Note that the function returns literal `0x80`:
    `return (0x80);`

That is used to check the return value is as the case in other areas
of the code.

Cc: Erich McMillan <emcmillan@microsoft.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com>
Co-authored-by: Erich McMillan <emcmillan@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Reviewed-by: Oliver Smith-Denny <osd@smith-denny.com>
2023-04-03 15:29:08 +00:00
..
CryptAuthenticode.c CryptoPkg/Library/BaseCryptLib: Update internal functions/variables 2022-10-24 07:49:43 +00:00
CryptAuthenticodeNull.c CryptoPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:22 -07:00
CryptDh.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptDhNull.c CryptoPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:22 -07:00
CryptEc.c CryptoPkg: Add EC key retrieving and signature interface. 2022-10-12 05:56:00 +00:00
CryptEcNull.c CryptoPkg: Add EC key retrieving and signature interface. 2022-10-12 05:56:00 +00:00
CryptPkcs1Oaep.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptPkcs1OaepNull.c CryptoPkg: Change OPTIONAL keyword usage style 2021-12-07 17:24:28 +00:00
CryptPkcs5Pbkdf2.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptPkcs5Pbkdf2Null.c CryptoPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:22 -07:00
CryptPkcs7Sign.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptPkcs7SignNull.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptPkcs7VerifyBase.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptPkcs7VerifyCommon.c CryptoPkg/Library/BaseCryptLib: Update internal functions/variables 2022-10-24 07:49:43 +00:00
CryptPkcs7VerifyEku.c CryptoPkg/Library/BaseCryptLib: Update internal functions/variables 2022-10-24 07:49:43 +00:00
CryptPkcs7VerifyEkuNull.c CryptoPkg: Add SecCryptLib 2022-06-03 11:41:36 +00:00
CryptPkcs7VerifyEkuRuntime.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptPkcs7VerifyNull.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptPkcs7VerifyRuntime.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptRsaBasic.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptRsaBasicNull.c CryptoPkg: Add SecCryptLib 2022-06-03 11:41:36 +00:00
CryptRsaExt.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptRsaExtNull.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptRsaPss.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptRsaPssNull.c CryptoPkg: BaseCryptLib: Update Salt length requirement for RSA-PSS scheme. 2021-06-23 15:19:44 +00:00
CryptRsaPssSign.c CryptoPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CryptRsaPssSignNull.c CryptoPkg: BaseCryptLib: Update Salt length requirement for RSA-PSS scheme. 2021-06-23 15:19:44 +00:00
CryptTs.c CryptoPkg/Library/BaseCryptLib: Update internal functions/variables 2022-10-24 07:49:43 +00:00
CryptTsNull.c CryptoPkg: Replace BSD License with BSD+Patent License 2019-04-09 09:10:22 -07:00
CryptX509.c CryptoPkg: Fix conditionally uninitialized variable 2023-04-03 15:29:08 +00:00
CryptX509Null.c CryptoPkg: add new X509 function. 2022-10-12 06:38:15 +00:00