CryptoPkg/BaseCryptLib: Add C-structure to matching certificate stack
authorchenc2 <chen.a.chen@intel.com>
Tue, 7 Nov 2017 00:56:56 +0000 (08:56 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Tue, 7 Nov 2017 14:06:48 +0000 (22:06 +0800)
commit3702637a528707704fb37defea042f7b10709ec4
treed387c3d2c4fe2b4f01647ac01b79743e8ea16178
parent829633e3a82dee6f7f2541a0193331f6b8566dec
CryptoPkg/BaseCryptLib: Add C-structure to matching certificate stack

The parameter CertStack of Pkcs7GetSigners will return all embedded X.509
certificate in one given PKCS7 signature. The format is:
//
// UINT8  CertNumber;
// UINT32 Cert1Length;
// UINT8  Cert1[];
// UINT32 Cert2Length;
// UINT8  Cert2[];
// ...
// UINT32 CertnLength;
// UINT8  Certn[];
//
Add EFI_CERT_STACK and EFI_CERT_DATA structure, these two C-structure are
used for parsing CertStack more clearly.

Cc: Long Qin <qin.long@intel.com>
Cc: Zhang Chao <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: chenc2 <chen.a.chen@intel.com>
Reviewed-by: Long Qin <qin.long@intel.com>
Reviewed-by: Zhang Chao <chao.b.zhang@intel.com>
CryptoPkg/Include/Library/BaseCryptLib.h
CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c
CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyNull.c