summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/n_pkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/n_pkey.c')
-rw-r--r--src/lib/libcrypto/asn1/n_pkey.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/n_pkey.c b/src/lib/libcrypto/asn1/n_pkey.c
index 9146ee02c9..766b51c538 100644
--- a/src/lib/libcrypto/asn1/n_pkey.c
+++ b/src/lib/libcrypto/asn1/n_pkey.c
@@ -187,7 +187,7 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp, int (*cb)(), int sgckey)
187 i2d_NETSCAPE_PKEY(pkey,&zz); 187 i2d_NETSCAPE_PKEY(pkey,&zz);
188 188
189 /* Wipe the private key encoding */ 189 /* Wipe the private key encoding */
190 memset(pkey->private_key->data, 0, rsalen); 190 OPENSSL_cleanse(pkey->private_key->data, rsalen);
191 191
192 if (cb == NULL) 192 if (cb == NULL)
193 cb=EVP_read_pw_string; 193 cb=EVP_read_pw_string;
@@ -206,7 +206,7 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp, int (*cb)(), int sgckey)
206 } 206 }
207 207
208 EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL); 208 EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
209 memset(buf,0,256); 209 OPENSSL_cleanse(buf,256);
210 210
211 /* Encrypt private key in place */ 211 /* Encrypt private key in place */
212 zz = enckey->enckey->digest->data; 212 zz = enckey->enckey->digest->data;
@@ -294,7 +294,7 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
294 } 294 }
295 295
296 EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL); 296 EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
297 memset(buf,0,256); 297 OPENSSL_cleanse(buf,256);
298 298
299 EVP_CIPHER_CTX_init(&ctx); 299 EVP_CIPHER_CTX_init(&ctx);
300 EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL); 300 EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL);