summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/p8_pkey.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-11-28 08:04:36 +0000
committerRichard Levitte <levitte@openssl.org>2002-11-28 08:04:36 +0000
commit4579924b7e55fccc7013e6de196f2e2ab175ce39 (patch)
treefa19611a704cc901d3ba338cefbbb98878de7ee5 /crypto/asn1/p8_pkey.c
parent2047bda6fb8bedab1103b7bd5df5ea55eb7ccc9b (diff)
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/asn1/p8_pkey.c')
-rw-r--r--crypto/asn1/p8_pkey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/p8_pkey.c b/crypto/asn1/p8_pkey.c
index b634d5bc85..24b409132f 100644
--- a/crypto/asn1/p8_pkey.c
+++ b/crypto/asn1/p8_pkey.c
@@ -68,8 +68,8 @@ static int pkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it)
if(operation == ASN1_OP_FREE_PRE) {
PKCS8_PRIV_KEY_INFO *key = (PKCS8_PRIV_KEY_INFO *)*pval;
if (key->pkey->value.octet_string)
- memset(key->pkey->value.octet_string->data,
- 0, key->pkey->value.octet_string->length);
+ OPENSSL_cleanse(key->pkey->value.octet_string->data,
+ key->pkey->value.octet_string->length);
}
return 1;
}