]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c
CryptoPkg: Wrapper files updates to support openssl-1.0.2c
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Pk / CryptPkcs7Verify.c
index a9665d50473f544d464918eb170ed28557eb2943..a1bab8a0ce56ed3f908ce1da767121e094d5c6c9 100644 (file)
@@ -10,7 +10,7 @@
   WrapPkcs7Data(), Pkcs7GetSigners(), Pkcs7Verify() will get UEFI Authenticated\r
   Variable and will do basic check for data structure.\r
 \r
-Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -273,7 +273,7 @@ X509PopCertificate (
     goto _Exit;\r
   }\r
 \r
-  Length = ((BUF_MEM *) CertBio->ptr)->length;\r
+  Length = (INT32)(((BUF_MEM *) CertBio->ptr)->length);\r
   if (Length <= 0) {\r
     goto _Exit;\r
   }\r
@@ -343,7 +343,7 @@ Pkcs7GetSigners (
   PKCS7            *Pkcs7;\r
   BOOLEAN          Status;\r
   UINT8            *SignedData;\r
-  UINT8            *Temp;\r
+  CONST UINT8      *Temp;\r
   UINTN            SignedDataSize;\r
   BOOLEAN          Wrapped;\r
   STACK_OF(X509)   *Stack;\r
@@ -549,7 +549,7 @@ Pkcs7Verify (
   X509        *Cert;\r
   X509_STORE  *CertStore;\r
   UINT8       *SignedData;\r
-  UINT8       *Temp;\r
+  CONST UINT8 *Temp;\r
   UINTN       SignedDataSize;\r
   BOOLEAN     Wrapped;\r
 \r
@@ -618,7 +618,8 @@ Pkcs7Verify (
   //\r
   // Read DER-encoded root certificate and Construct X509 Certificate\r
   //\r
-  Cert = d2i_X509 (NULL, &TrustedCert, (long) CertLength);\r
+  Temp = TrustedCert;\r
+  Cert = d2i_X509 (NULL, &Temp, (long) CertLength);\r
   if (Cert == NULL) {\r
     goto _Exit;\r
   }\r