提交 db922318 编写于 作者: D David Woodhouse 提交者: Rich Salz

Elide EVP_read_pw_string() and friends for no-ui

Signed-off-by: NRich Salz <rsalz@openssl.org>
Reviewed-by: NKurt Roeckx <kurt@openssl.org>
上级 d3054fb6
......@@ -62,6 +62,7 @@
#include <openssl/evp.h>
#include <openssl/ui.h>
#ifndef OPENSSL_NO_UI
/* should be init to zeros. */
static char prompt_string[80];
......@@ -116,6 +117,7 @@ int EVP_read_pw_string_min(char *buf, int min, int len, const char *prompt,
OPENSSL_cleanse(buff, BUFSIZ);
return ret;
}
#endif /* OPENSSL_NO_UI */
int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
const unsigned char *salt, const unsigned char *data,
......
......@@ -81,7 +81,7 @@ int pem_check_suffix(const char *pem_str, const char *suffix);
int PEM_def_callback(char *buf, int num, int w, void *key)
{
#ifdef OPENSSL_NO_STDIO
#if defined(OPENSSL_NO_STDIO) || defined(OPENSSL_NO_UI)
/*
* We should not ever call the default callback routine from windows.
*/
......
......@@ -557,11 +557,13 @@ int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
__owur int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md,
unsigned int *s);
#ifndef OPENSSL_NO_UI
int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
const char *prompt, int verify);
void EVP_set_pw_prompt(const char *prompt);
char *EVP_get_pw_prompt(void);
#endif
__owur int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
const unsigned char *salt,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册