diff options
author | Richard Levitte <levitte@openssl.org> | 2002-11-28 09:04:36 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-11-28 09:04:36 +0100 |
commit | 4579924b7e55fccc7013e6de196f2e2ab175ce39 (patch) | |
tree | fa19611a704cc901d3ba338cefbbb98878de7ee5 /crypto/pkcs12/p12_crpt.c | |
parent | Unused variable removed. (diff) | |
download | openssl-4579924b7e55fccc7013e6de196f2e2ab175ce39.tar.xz openssl-4579924b7e55fccc7013e6de196f2e2ab175ce39.zip |
Cleanse memory using the new OPENSSL_cleanse() function.
I've covered all the memset()s I felt safe modifying, but may have missed some.
Diffstat (limited to 'crypto/pkcs12/p12_crpt.c')
-rw-r--r-- | crypto/pkcs12/p12_crpt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/pkcs12/p12_crpt.c b/crypto/pkcs12/p12_crpt.c index 97be6a5fb5..5e8958612b 100644 --- a/crypto/pkcs12/p12_crpt.c +++ b/crypto/pkcs12/p12_crpt.c @@ -118,7 +118,7 @@ int PKCS12_PBE_keyivgen (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, } PBEPARAM_free(pbe); EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de); - memset(key, 0, EVP_MAX_KEY_LENGTH); - memset(iv, 0, EVP_MAX_IV_LENGTH); + OPENSSL_cleanse(key, EVP_MAX_KEY_LENGTH); + OPENSSL_cleanse(iv, EVP_MAX_IV_LENGTH); return 1; } |