]> git.proxmox.com Git - mirror_edk2.git/commit
CryptoPkg/BaseCryptLib: split CryptPkcs7Verify.c on behalf of runtime
authorJian J Wang <jian.j.wang@intel.com>
Mon, 28 Jan 2019 07:34:47 +0000 (15:34 +0800)
committerJian J Wang <jian.j.wang@intel.com>
Thu, 31 Jan 2019 13:25:05 +0000 (21:25 +0800)
commitcc01b26e053c7ae1e33889c8bc42beaa1d7799ac
tree165ae536f5a12e23cb970d488a0eae068ae1b730
parent37bf678761d4a7dae8875f25d07c290da307b64c
CryptoPkg/BaseCryptLib: split CryptPkcs7Verify.c on behalf of runtime

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1493

Pkcs7GetAttachedContent() implementation in current CryptPkcs7Verify.c
is actually shared by RuntimeCryptLib.inf, SmmCryptLib.inf and
BaseCryptLib.inf, which are not correct since there's no use scenario
for runtime and AllocatePool() used in this method can only be called
in boot time.

This patch fix this issue by splitting file CryptPkcs7Verify.c into 3 parts.

  CryptPkcs7VerifyCommon.c  (shared among Base, SMM, Runtime)
  CryptPkcs7VerifyBase.c    (shared between Base, SMM)
  CryptPkcs7VerifyRuntime.c (for Runtime only)

CryptPkcs7VerifyBase.c will have original implementation of
Pkcs7GetAttachedContent() as CryptPkcs7Verify.c. CryptPkcs7VerifyRuntime.c
provide a NULL version of Pkcs7GetAttachedContent().

No functionality and interface change is involved in this patch.

Cc: Ting Ye <ting.ye@intel.com>
Cc: Qin Long <qin.long@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
CryptoPkg/Library/BaseCryptLib/InternalCryptLib.h
CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c [deleted file]
CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyBase.c [new file with mode: 0644]
CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyCommon.c [new file with mode: 0644]
CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyRuntime.c [new file with mode: 0644]
CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf