aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12/p12_decr.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/pkcs12/p12_decr.c
parent2047bda6fb8bedab1103b7bd5df5ea55eb7ccc9b (diff)
downloadopenssl-4579924b7e55fccc7013e6de196f2e2ab175ce39.tar.gz
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_decr.c')
-rw-r--r--crypto/pkcs12/p12_decr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/pkcs12/p12_decr.c b/crypto/pkcs12/p12_decr.c
index 394af368f4..b5684a83ba 100644
--- a/crypto/pkcs12/p12_decr.c
+++ b/crypto/pkcs12/p12_decr.c
@@ -136,7 +136,7 @@ void * PKCS12_item_decrypt_d2i(X509_ALGOR *algor, const ASN1_ITEM *it,
}
#endif
ret = ASN1_item_d2i(NULL, &p, outlen, it);
- if (zbuf) memset(out, 0, outlen);
+ if (zbuf) OPENSSL_cleanse(out, outlen);
if(!ret) PKCS12err(PKCS12_F_PKCS12_DECRYPT_D2I,PKCS12_R_DECODE_ERROR);
OPENSSL_free(out);
return ret;
@@ -168,7 +168,7 @@ ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor, const ASN1_ITEM *i
OPENSSL_free(in);
return NULL;
}
- if (zbuf) memset(in, 0, inlen);
+ if (zbuf) OPENSSL_cleanse(in, inlen);
OPENSSL_free(in);
return oct;
}