[openssl-commits] [openssl] OpenSSL_1_1_1-stable update
yang.yang at baishancloud.com
yang.yang at baishancloud.com
Sat Oct 13 13:20:28 UTC 2018
The branch OpenSSL_1_1_1-stable has been updated
via 3924d699655a39d5d886ab3d4f8c467ef2fa0899 (commit)
from 2b03114593c59b3010a0d5166ec349b8985a8290 (commit)
- Log -----------------------------------------------------------------
commit 3924d699655a39d5d886ab3d4f8c467ef2fa0899
Author: Mykola Baibuz <nb at cipher.kiev.ua>
Date: Thu Oct 11 12:07:26 2018 +0800
Safer memory cleanup in (crypto/rsa/rsa_lib.c)
We don't need to use secure clean for public key.
CLA: trivial
Reviewed-by: Paul Dale <paul.dale at oracle.com>
Reviewed-by: Paul Yang <yang.yang at baishancloud.com>
(Merged from https://github.com/openssl/openssl/pull/7363)
(cherry picked from commit c033101db39c93cf41d80dfee4357f2617ede1a0)
-----------------------------------------------------------------------
Summary of changes:
crypto/rsa/rsa_lib.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c
index 72d1b5e..49c34b7 100644
--- a/crypto/rsa/rsa_lib.c
+++ b/crypto/rsa/rsa_lib.c
@@ -125,8 +125,8 @@ void RSA_free(RSA *r)
CRYPTO_THREAD_lock_free(r->lock);
- BN_clear_free(r->n);
- BN_clear_free(r->e);
+ BN_free(r->n);
+ BN_free(r->e);
BN_clear_free(r->d);
BN_clear_free(r->p);
BN_clear_free(r->q);
@@ -196,7 +196,7 @@ int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
r->e = e;
}
if (d != NULL) {
- BN_free(r->d);
+ BN_clear_free(r->d);
r->d = d;
}
@@ -213,11 +213,11 @@ int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q)
return 0;
if (p != NULL) {
- BN_free(r->p);
+ BN_clear_free(r->p);
r->p = p;
}
if (q != NULL) {
- BN_free(r->q);
+ BN_clear_free(r->q);
r->q = q;
}
@@ -235,15 +235,15 @@ int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp)
return 0;
if (dmp1 != NULL) {
- BN_free(r->dmp1);
+ BN_clear_free(r->dmp1);
r->dmp1 = dmp1;
}
if (dmq1 != NULL) {
- BN_free(r->dmq1);
+ BN_clear_free(r->dmq1);
r->dmq1 = dmq1;
}
if (iqmp != NULL) {
- BN_free(r->iqmp);
+ BN_clear_free(r->iqmp);
r->iqmp = iqmp;
}
More information about the openssl-commits
mailing list