remove OPENSSL_NO_ASM dependency
[oweals/openssl.git] / crypto / evp / evp_key.c
index dc103bd1d7ff2614de7584e3b1a1d3b58c247a7d..0a27f496c9693837502c4490c67a5b5a6e7694f1 100644 (file)
@@ -66,7 +66,7 @@
 /* should be init to zeros. */
 static char prompt_string[80];
 
-void EVP_set_pw_prompt(char *prompt)
+void EVP_set_pw_prompt(const char *prompt)
        {
        if (prompt == NULL)
                prompt_string[0]='\0';
@@ -103,7 +103,7 @@ int EVP_read_pw_string(char *buf, int len, const char *prompt, int verify)
                        buff,0,(len>=BUFSIZ)?BUFSIZ-1:len,buf);
        ret = UI_process(ui);
        UI_free(ui);
-       memset(buff,0,BUFSIZ);
+       OPENSSL_cleanse(buff,BUFSIZ);
        return ret;
        }
 
@@ -168,7 +168,7 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
                if ((nkey == 0) && (niv == 0)) break;
                }
        EVP_MD_CTX_cleanup(&c);
-       memset(&(md_buf[0]),0,EVP_MAX_MD_SIZE);
+       OPENSSL_cleanse(&(md_buf[0]),EVP_MAX_MD_SIZE);
        return(type->key_len);
        }