[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Mon Mar 7 17:54:16 UTC 2016
The branch master has been updated
via db922318b3470db8629979f24d4f0f82e9561190 (commit)
from d3054fb663a6a3a4689e52c10bb3094c39a3bce8 (commit)
- Log -----------------------------------------------------------------
commit db922318b3470db8629979f24d4f0f82e9561190
Author: David Woodhouse <David.Woodhouse at intel.com>
Date: Sun Feb 21 11:36:52 2016 +0000
Elide EVP_read_pw_string() and friends for no-ui
Signed-off-by: Rich Salz <rsalz at openssl.org>
Reviewed-by: Kurt Roeckx <kurt at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/evp/evp_key.c | 2 ++
crypto/pem/pem_lib.c | 2 +-
include/openssl/evp.h | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/crypto/evp/evp_key.c b/crypto/evp/evp_key.c
index ccd9280..995d355 100644
--- a/crypto/evp/evp_key.c
+++ b/crypto/evp/evp_key.c
@@ -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,
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c
index 946b00e..54ddc1e 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.
*/
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index aef43f4..0b6b82a 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -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,
More information about the openssl-commits
mailing list