audk/CryptoPkg/Library
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
..
BaseCryptLib CryptoPkg: Remove deprecated function usage in X509GetCommonName() 2018-06-05 10:16:03 +08:00
BaseCryptLibRuntimeCryptProtocol CryptoPkg: Add new API to retrieve commonName of X.509 certificate 2017-09-25 00:06:41 +08:00
Include CryptoPkg/CrtLibSupport: add secure_getenv() stub function 2018-05-08 13:29:06 +02:00
IntrinsicLib CryptoPkg/IntrinsicLib: Fix the warning on memset 2017-11-24 16:36:29 +08:00
OpensslLib CryptoPkg/OpensslLib: remove OpenSSL version number from OpenSSL-HOWTO.txt 2018-04-26 12:46:27 +02:00
TlsLib CryptoPkg/TlsLib: rewrite TlsSetCipherList() 2018-04-13 14:06:24 +02:00