summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_sign.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/a_sign.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/a_sign.c')
-rw-r--r--crypto/asn1/a_sign.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/asn1/a_sign.c b/crypto/asn1/a_sign.c
index de53b44144..52ce7e3974 100644
--- a/crypto/asn1/a_sign.c
+++ b/crypto/asn1/a_sign.c
@@ -204,9 +204,9 @@ int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2,
err:
EVP_MD_CTX_cleanup(&ctx);
if (buf_in != NULL)
- { memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
+ { OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); }
if (buf_out != NULL)
- { memset((char *)buf_out,0,outll); OPENSSL_free(buf_out); }
+ { OPENSSL_cleanse((char *)buf_out,outll); OPENSSL_free(buf_out); }
return(outl);
}
@@ -287,8 +287,8 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
err:
EVP_MD_CTX_cleanup(&ctx);
if (buf_in != NULL)
- { memset((char *)buf_in,0,(unsigned int)inl); OPENSSL_free(buf_in); }
+ { OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); }
if (buf_out != NULL)
- { memset((char *)buf_out,0,outll); OPENSSL_free(buf_out); }
+ { OPENSSL_cleanse((char *)buf_out,outll); OPENSSL_free(buf_out); }
return(outl);
}