diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-11-25 16:17:26 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-11-25 16:17:26 +0100 |
commit | a6192f347fb87289c9cfdc4d57b126d704eba0de (patch) | |
tree | a444d7679f2d7d239fa7776fba8b5b578582adee /networking/tls_rsa.h | |
parent | eb53d01be54caf0208e4006c089d7841fe4a0f57 (diff) | |
download | busybox-w32-a6192f347fb87289c9cfdc4d57b126d704eba0de.tar.gz busybox-w32-a6192f347fb87289c9cfdc4d57b126d704eba0de.tar.bz2 busybox-w32-a6192f347fb87289c9cfdc4d57b126d704eba0de.zip |
tls: do not leak RSA key
function old new delta
tls_handshake 1957 2059 +102
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/tls_rsa.h')
-rw-r--r-- | networking/tls_rsa.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/networking/tls_rsa.h b/networking/tls_rsa.h index f42923ff5..82bea2a67 100644 --- a/networking/tls_rsa.h +++ b/networking/tls_rsa.h | |||
@@ -13,6 +13,18 @@ typedef struct { | |||
13 | //bbox psPool_t *pool; | 13 | //bbox psPool_t *pool; |
14 | } psRsaKey_t; | 14 | } psRsaKey_t; |
15 | 15 | ||
16 | static ALWAYS_INLINE void psRsaKey_clear(psRsaKey_t *key) | ||
17 | { | ||
18 | pstm_clear(&key->N); | ||
19 | pstm_clear(&key->e); | ||
20 | pstm_clear(&key->d); | ||
21 | pstm_clear(&key->p); | ||
22 | pstm_clear(&key->q); | ||
23 | pstm_clear(&key->dP); | ||
24 | pstm_clear(&key->dQ); | ||
25 | pstm_clear(&key->qP); | ||
26 | } | ||
27 | |||
16 | #define psRsaEncryptPub(pool, key, in, inlen, out, outlen, data) \ | 28 | #define psRsaEncryptPub(pool, key, in, inlen, out, outlen, data) \ |
17 | psRsaEncryptPub( key, in, inlen, out, outlen) | 29 | psRsaEncryptPub( key, in, inlen, out, outlen) |
18 | int32 psRsaEncryptPub(psPool_t *pool, psRsaKey_t *key, | 30 | int32 psRsaEncryptPub(psPool_t *pool, psRsaKey_t *key, |