summaryrefslogtreecommitdiff
path: root/Cryptlib/Pk/CryptAuthenticode.c
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2015-12-15 10:48:10 +0800
committerPeter Jones <pjones@redhat.com>2016-09-06 15:05:34 -0400
commite571428e21280c28d0d591b70f13add7d8dbfe81 (patch)
treefadafcf006016eb83dd989969d2232048048bad8 /Cryptlib/Pk/CryptAuthenticode.c
parent7052e75307553edc8f04eb529b0d37844fbcc30b (diff)
downloadefi-boot-shim-e571428e21280c28d0d591b70f13add7d8dbfe81.tar.gz
efi-boot-shim-e571428e21280c28d0d591b70f13add7d8dbfe81.zip
Update to openssl to 1.0.2e
Also update Cryptlib to edk2 r19218 - Undefine NO_BUILTIN_VA_FUNCS in Cryptlib/OpenSSL/ for x86_64 to use the gcc builtins and remove all EFIAPI from the functions - Move the most of defines into the headers instead of Makefile - Remove the global variable 'timeval' - Remove the unused code: crypto/pqueue/* and crypto/ts/* - Include bn.h in MokManager.c due to the changes in openssl Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/Pk/CryptAuthenticode.c')
-rw-r--r--Cryptlib/Pk/CryptAuthenticode.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Cryptlib/Pk/CryptAuthenticode.c b/Cryptlib/Pk/CryptAuthenticode.c
index 9e933558..857281d7 100644
--- a/Cryptlib/Pk/CryptAuthenticode.c
+++ b/Cryptlib/Pk/CryptAuthenticode.c
@@ -77,7 +77,7 @@ AuthenticodeVerify (
UINT8 *SpcIndirectDataContent;
UINT8 Asn1Byte;
UINTN ContentSize;
- UINT8 *SpcIndirectDataOid;
+ CONST UINT8 *SpcIndirectDataOid;
//
// Check input parameters.
@@ -115,8 +115,9 @@ AuthenticodeVerify (
// some authenticode-specific structure. Use opaque ASN.1 string to retrieve
// PKCS#7 ContentInfo here.
//
- SpcIndirectDataOid = (UINT8 *)(Pkcs7->d.sign->contents->type->data);
- if (CompareMem (
+ SpcIndirectDataOid = OBJ_get0_data(Pkcs7->d.sign->contents->type);
+ if (OBJ_length(Pkcs7->d.sign->contents->type) != sizeof(mSpcIndirectOidValue) ||
+ CompareMem (
SpcIndirectDataOid,
mSpcIndirectOidValue,
sizeof (mSpcIndirectOidValue)