diff options
| author | Doug Flick <dougflick@microsoft.com> | 2026-06-04 01:08:07 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-08-28 15:37:18 +0300 |
| commit | 07a37d45eef9972b7fc3deb761d5c24527a17387 (patch) | |
| tree | 987f6a635a611dc9d90211d2b2f43214100b744f /MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptInternalFormat.h | |
| parent | 294f56bcb3b41b733f4b5425e23512ab7a3270cf (diff) | |
| download | edk2-07a37d45eef9972b7fc3deb761d5c24527a17387.tar.xz | |
CryptoPkg: Add Pkcs7Encrypt smoke tests
These don't actually decrypt anything, so calling them "unit tests"
was a stretch. They're smoke tests: build an envelopedData ContentInfo
for a recipient cert, then walk the DER and check the shape looks
right (id-envelopedData, CMSVersion, the right number of
RecipientInfo entries, the expected content-encryption OID).
Covered:
* AES-128/192/256-CBC happy paths.
* Two recipients, just to confirm the SET grows.
* The parameter-validation contract from BaseCryptLib.h
(NULL stack/InData/output pointers, bogus CipherNid, bogus Flags).
The DER walker is hand-rolled in the test file so we don't have to
pull OpenSSL or mbedtls headers into a unit test that has to compile
against both. It catches obvious shape regressions but won't notice
if the CEK, IV, or PKCS#7 padding are wrong - a real round-trip needs
a Pkcs7Decrypt API we don't have yet.
Signed-off-by: Doug Flick <dougflick@microsoft.com>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptInternalFormat.h')
0 files changed, 0 insertions, 0 deletions
