audk/CryptoPkg/Library/BaseCryptLib/Pk
Long Qin 0b6457efab CryptoPkg: Remove deprecated function usage in X509GetCommonName()
BZ#: https://bugzilla.tianocore.org/show_bug.cgi?id=923

X509_NAME_get_text_by_NID() used in X509GetCommonName() implementation
is one legacy function which have various limitations. The returned
data may be not usable  when the target cert contains multicharacter
string type like a BMPString or a UTF8String.
This patch replaced the legacy function usage with more general
X509_NAME_get_index_by_NID() / X509_NAME_get_entry() APIs for X509
CommonName retrieving.

Tests: Validated the commonName retrieving with test certificates
       containing PrintableString or BMPString data.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Long Qin <qin.long@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
2018-06-05 10:16:03 +08:00
..
CryptAuthenticode.c CryptoPkg: Fix typos in comments 2016-11-07 23:21:22 +08:00
CryptAuthenticodeNull.c CryptoPkg: Fix typos in comments 2016-11-07 23:21:22 +08:00
CryptDh.c CryptoPkg/BaseCryptLib: Add NULL pointer checks in DH and P7Verify 2017-05-22 08:57:48 +08:00
CryptDhNull.c Add interfaces to several library instances of BaseCryptLib. 2012-07-18 09:32:05 +00:00
CryptPkcs5Pbkdf2.c CryptoPkg: Add PKCS5 PBKDF2 interface for password derivation. 2016-11-02 23:19:01 +08:00
CryptPkcs5Pbkdf2Null.c CryptoPkg: Add PKCS5 PBKDF2 interface for password derivation. 2016-11-02 23:19:01 +08:00
CryptPkcs7Sign.c CryptoPkg/BaseCryptLib: Fix mismatched memory allocation/free 2017-11-06 14:51:39 +08:00
CryptPkcs7SignNull.c CryptoPkg/BaseCryptLib: Fix mismatched memory allocation/free 2017-11-06 14:51:39 +08:00
CryptPkcs7Verify.c CryptoPkg/BaseCryptLib: Add C-structure to matching certificate stack 2017-11-07 22:06:48 +08:00
CryptPkcs7VerifyNull.c CryptoPkg/BaseCryptLib: Add C-structure to matching certificate stack 2017-11-07 22:06:48 +08:00
CryptRsaBasic.c CryptoPkg: Update PK Cipher Wrappers work with opaque objects. 2017-03-29 16:18:32 +08:00
CryptRsaExt.c CryptoPkg: Update PK Cipher Wrappers work with opaque objects. 2017-03-29 16:18:32 +08:00
CryptRsaExtNull.c Add interfaces to several library instances of BaseCryptLib. 2012-07-18 09:32:05 +00:00
CryptTs.c CryptoPkg: Update PK Cipher Wrappers work with opaque objects. 2017-03-29 16:18:32 +08:00
CryptTsNull.c CryptoPkg: Fix typos in comments 2016-11-07 23:21:22 +08:00
CryptX509.c CryptoPkg: Remove deprecated function usage in X509GetCommonName() 2018-06-05 10:16:03 +08:00
CryptX509Null.c CryptoPkg: Remove deprecated function usage in X509GetCommonName() 2018-06-05 10:16:03 +08:00