summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/rsa/rsa_oaep.c
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2017-03-15 15:42:28 +0800
committerPeter Jones <pjones@redhat.com>2017-03-24 18:28:30 -0400
commitf48505bfb2b479694c01f7c56bd3548dfe243f46 (patch)
tree847f1a623556f73c602628a9e5e8d5d590e9fc99 /Cryptlib/OpenSSL/crypto/rsa/rsa_oaep.c
parent832152986545e8fc66f1ed5cf9d8bf518c7df2b3 (diff)
downloadefi-boot-shim-f48505bfb2b479694c01f7c56bd3548dfe243f46.tar.gz
efi-boot-shim-f48505bfb2b479694c01f7c56bd3548dfe243f46.zip
Update to openssl 1.0.2k
Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/rsa/rsa_oaep.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/rsa/rsa_oaep.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Cryptlib/OpenSSL/crypto/rsa/rsa_oaep.c b/Cryptlib/OpenSSL/crypto/rsa/rsa_oaep.c
index 9c2a943c..19d28c6f 100644
--- a/Cryptlib/OpenSSL/crypto/rsa/rsa_oaep.c
+++ b/Cryptlib/OpenSSL/crypto/rsa/rsa_oaep.c
@@ -89,17 +89,21 @@ int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
}
if (PKCS1_MGF1(dbmask, emlen - mdlen, seed, mdlen, mgf1md) < 0)
- return 0;
+ goto err;
for (i = 0; i < emlen - mdlen; i++)
db[i] ^= dbmask[i];
if (PKCS1_MGF1(seedmask, mdlen, db, emlen - mdlen, mgf1md) < 0)
- return 0;
+ goto err;
for (i = 0; i < mdlen; i++)
seed[i] ^= seedmask[i];
OPENSSL_free(dbmask);
return 1;
+
+ err:
+ OPENSSL_free(dbmask);
+ return 0;
}
int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,