diff options
author | Qin Long <qin.long@intel.com> | 2015-06-16 00:54:16 +0000 |
---|---|---|
committer | qlong <qlong@Edk2> | 2015-06-16 00:54:16 +0000 |
commit | 1463ce18ca7c4f971c08cc6341dbb0adb25c831a (patch) | |
tree | dc297d4eaf3ff5330ce62be72eadaa25bf755b14 /CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Sign.c | |
parent | 73c54a58232b419906e9494a79c2c5eb71919caf (diff) | |
download | edk2-platforms-1463ce18ca7c4f971c08cc6341dbb0adb25c831a.tar.xz |
CryptoPkg: Wrapper files updates to support openssl-1.0.2c
This patch updates some support header and wrapper files to support
openssl-1.0.2c build, and correct some openssl API usages and
boundary check.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17635 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Sign.c')
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Sign.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Sign.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Sign.c index 63fe78fc86..704eb4ec94 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Sign.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Sign.c @@ -1,7 +1,7 @@ /** @file
PKCS#7 SignedData Sign Wrapper Implementation over OpenSSL.
-Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -116,9 +116,9 @@ Pkcs7Sign ( if (Key == NULL) {
goto _Exit;
}
- Key->save_type = EVP_PKEY_RSA;
- Key->type = EVP_PKEY_type (EVP_PKEY_RSA);
- Key->pkey.rsa = (RSA *) RsaContext;
+ if (EVP_PKEY_assign_RSA (Key, (RSA *) RsaContext) == 0) {
+ goto _Exit;
+ }
//
// Convert the data to be signed to BIO format.
@@ -175,7 +175,7 @@ Pkcs7Sign ( }
CopyMem (*SignedData, P7Data + 19, *SignedDataSize);
-
+
OPENSSL_free (P7Data);
Status = TRUE;
|