summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/hmac/hm_ameth.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/OpenSSL/crypto/hmac/hm_ameth.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/OpenSSL/crypto/hmac/hm_ameth.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/hmac/hm_ameth.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Cryptlib/OpenSSL/crypto/hmac/hm_ameth.c b/Cryptlib/OpenSSL/crypto/hmac/hm_ameth.c
index 29b2b5df..944c6c85 100644
--- a/Cryptlib/OpenSSL/crypto/hmac/hm_ameth.c
+++ b/Cryptlib/OpenSSL/crypto/hmac/hm_ameth.c
@@ -108,9 +108,14 @@ static int old_hmac_decode(EVP_PKEY *pkey,
ASN1_OCTET_STRING *os;
os = ASN1_OCTET_STRING_new();
if (!os || !ASN1_OCTET_STRING_set(os, *pder, derlen))
- return 0;
- EVP_PKEY_assign(pkey, EVP_PKEY_HMAC, os);
+ goto err;
+ if (!EVP_PKEY_assign(pkey, EVP_PKEY_HMAC, os))
+ goto err;
return 1;
+
+ err:
+ ASN1_OCTET_STRING_free(os);
+ return 0;
}
static int old_hmac_encode(const EVP_PKEY *pkey, unsigned char **pder)