diff options
| author | Steve Langasek <steve.langasek@canonical.com> | 2016-10-01 14:18:49 -0700 |
|---|---|---|
| committer | Steve Langasek <steve.langasek@canonical.com> | 2016-10-01 14:18:49 -0700 |
| commit | b65e78ec015a308c1798e602c94502327cc90cd9 (patch) | |
| tree | 4185dc52bcba0af1f815b88e100cd68a626916ca /Cryptlib/OpenSSL/crypto/hmac | |
| parent | 21ebe03556d7030055644f46efd3c165396a7a75 (diff) | |
| parent | 86b44a70f0e22233427cef3e966869e59b5e9dd5 (diff) | |
| download | efi-boot-shim-b65e78ec015a308c1798e602c94502327cc90cd9.tar.gz efi-boot-shim-b65e78ec015a308c1798e602c94502327cc90cd9.zip | |
Resync with Ubuntu, including patch to fix debian/copyright.
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/hmac')
| -rw-r--r-- | Cryptlib/OpenSSL/crypto/hmac/hm_ameth.c | 9 |
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) |
