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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/n_pkey.c b/src/lib/libcrypto/asn1/n_pkey.c
index d3a7431356..491f988e92 100644
--- a/src/lib/libcrypto/asn1/n_pkey.c
+++ b/src/lib/libcrypto/asn1/n_pkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: n_pkey.c,v 1.26 2015/03/19 14:00:22 tedu Exp $ */ 1/* $OpenBSD: n_pkey.c,v 1.27 2015/09/10 15:56:24 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -277,7 +277,7 @@ i2d_RSA_NET(const RSA *a, unsigned char **pp,
277 i2d_NETSCAPE_PKEY(pkey, &zz); 277 i2d_NETSCAPE_PKEY(pkey, &zz);
278 278
279 /* Wipe the private key encoding */ 279 /* Wipe the private key encoding */
280 OPENSSL_cleanse(pkey->private_key->data, rsalen); 280 explicit_bzero(pkey->private_key->data, rsalen);
281 281
282 if (cb == NULL) 282 if (cb == NULL)
283 cb = EVP_read_pw_string; 283 cb = EVP_read_pw_string;
@@ -297,7 +297,7 @@ i2d_RSA_NET(const RSA *a, unsigned char **pp,
297 297
298 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL)) 298 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL))
299 goto err; 299 goto err;
300 OPENSSL_cleanse(buf, sizeof(buf)); 300 explicit_bzero(buf, sizeof(buf));
301 301
302 /* Encrypt private key in place */ 302 /* Encrypt private key in place */
303 zz = enckey->enckey->digest->data; 303 zz = enckey->enckey->digest->data;
@@ -394,7 +394,7 @@ d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
394 394
395 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL)) 395 if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL))
396 goto err; 396 goto err;
397 OPENSSL_cleanse(buf, sizeof(buf)); 397 explicit_bzero(buf, sizeof(buf));
398 398
399 if (!EVP_DecryptInit_ex(&ctx, EVP_rc4(), NULL, key, NULL)) 399 if (!EVP_DecryptInit_ex(&ctx, EVP_rc4(), NULL, key, NULL))
400 goto err; 400 goto err;