From db922318b3470db8629979f24d4f0f82e9561190 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sun, 21 Feb 2016 11:36:52 +0000 Subject: Elide EVP_read_pw_string() and friends for no-ui Signed-off-by: Rich Salz Reviewed-by: Kurt Roeckx --- crypto/evp/evp_key.c | 2 ++ crypto/pem/pem_lib.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'crypto') diff --git a/crypto/evp/evp_key.c b/crypto/evp/evp_key.c index ccd9280d92..995d35503c 100644 --- a/crypto/evp/evp_key.c +++ b/crypto/evp/evp_key.c @@ -62,6 +62,7 @@ #include #include +#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, diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 946b00ef6d..54ddc1efbb 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -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. */ -- cgit v1.2.3