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>
This commit is contained in:
		| @@ -27,6 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | ||||
|   @param[out] CertStack    Pointer to Signer's certificates retrieved from P7Data. | ||||
|                            It's caller's responsibility to free the buffer with | ||||
|                            Pkcs7FreeSigners(). | ||||
|                            This data structure is EFI_CERT_STACK type. | ||||
|   @param[out] StackLength  Length of signer's certificates in bytes. | ||||
|   @param[out] TrustedCert  Pointer to a trusted certificate from Signer's certificates. | ||||
|                            It's caller's responsibility to free the buffer with | ||||
| @@ -79,9 +80,11 @@ Pkcs7FreeSigners ( | ||||
|   @param[out] SignerChainCerts  Pointer to the certificates list chained to signer's | ||||
|                                 certificate. It's caller's responsibility to free the buffer | ||||
|                                 with Pkcs7FreeSigners(). | ||||
|                                 This data structure is EFI_CERT_STACK type. | ||||
|   @param[out] ChainLength       Length of the chained certificates list buffer in bytes. | ||||
|   @param[out] UnchainCerts      Pointer to the unchained certificates lists. It's caller's | ||||
|                                 responsibility to free the buffer with Pkcs7FreeSigners(). | ||||
|                                 This data structure is EFI_CERT_STACK type. | ||||
|   @param[out] UnchainLength     Length of the unchained certificates list buffer in bytes. | ||||
|  | ||||
|   @retval  TRUE         The operation is finished successfully. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user