summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/hmac
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2016-09-22 10:15:26 -0400
committerMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2016-09-22 10:15:26 -0400
commit5998f019f85f765070f049332bf68d347d60c993 (patch)
tree796531832eed643b2fec02ae7f0949e84d152968 /Cryptlib/OpenSSL/crypto/hmac
parente3ef28acdfacfe07c42662d86af2135d1a100c24 (diff)
parent62f0afa2ecead02b1258dabab8097ca278a22f8f (diff)
downloadefi-boot-shim-5998f019f85f765070f049332bf68d347d60c993.tar.gz
efi-boot-shim-5998f019f85f765070f049332bf68d347d60c993.zip
New upstream release.
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/hmac')
-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)