summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs12/p12_crpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_crpt.c')
-rw-r--r--src/lib/libcrypto/pkcs12/p12_crpt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_crpt.c b/src/lib/libcrypto/pkcs12/p12_crpt.c
index 288c93c49f..0f215d2fe2 100644
--- a/src/lib/libcrypto/pkcs12/p12_crpt.c
+++ b/src/lib/libcrypto/pkcs12/p12_crpt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_crpt.c,v 1.11 2014/07/11 08:44:49 jsing Exp $ */ 1/* $OpenBSD: p12_crpt.c,v 1.12 2015/09/10 15:56:25 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -57,6 +57,7 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h>
60 61
61#include <openssl/err.h> 62#include <openssl/err.h>
62#include <openssl/pkcs12.h> 63#include <openssl/pkcs12.h>
@@ -111,7 +112,7 @@ PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
111 } 112 }
112 PBEPARAM_free(pbe); 113 PBEPARAM_free(pbe);
113 ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de); 114 ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de);
114 OPENSSL_cleanse(key, EVP_MAX_KEY_LENGTH); 115 explicit_bzero(key, EVP_MAX_KEY_LENGTH);
115 OPENSSL_cleanse(iv, EVP_MAX_IV_LENGTH); 116 explicit_bzero(iv, EVP_MAX_IV_LENGTH);
116 return ret; 117 return ret;
117} 118}