PR: 1422
[oweals/openssl.git] / crypto / asn1 / p8_pkey.c
index b634d5bc85c663d50973e709bec5f42a51a61e7d..0a1957556e54707f8696634f93879117d61b04e1 100644 (file)
@@ -1,5 +1,5 @@
 /* p8_pkey.c */
-/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 1999.
  */
 /* ====================================================================
@@ -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;
 }