summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/rsa/rsa_oaep.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/openssl/openssl/crypto/rsa/rsa_oaep.c')
-rw-r--r--deps/openssl/openssl/crypto/rsa/rsa_oaep.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/deps/openssl/openssl/crypto/rsa/rsa_oaep.c b/deps/openssl/openssl/crypto/rsa/rsa_oaep.c
index 19d28c6f0e..9a01b4afc1 100644
--- a/deps/openssl/openssl/crypto/rsa/rsa_oaep.c
+++ b/deps/openssl/openssl/crypto/rsa/rsa_oaep.c
@@ -237,10 +237,14 @@ int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP_MGF1,
RSA_R_OAEP_DECODING_ERROR);
cleanup:
- if (db != NULL)
+ if (db != NULL) {
+ OPENSSL_cleanse(db, dblen);
OPENSSL_free(db);
- if (em != NULL)
+ }
+ if (em != NULL) {
+ OPENSSL_cleanse(em, num);
OPENSSL_free(em);
+ }
return mlen;
}