Cleanse memory using the new OPENSSL_cleanse() function.
[oweals/openssl.git] / apps / ca.c
index 42738deb3a5378de24da617dbc001d30390914df..cac83a114f17f97e83a995a7ad90cc19d0e5f0d7 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -706,7 +706,7 @@ bad:
                }
        pkey = load_key(bio_err, keyfile, keyform, 0, key, e, 
                "CA private key");
-       if (key) memset(key,0,strlen(key));
+       if (key) OPENSSL_cleanse(key,strlen(key));
        if (pkey == NULL)
                {
                /* load_key() has already printed an appropriate message */