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

Elide DES_read_password() for no-ui build

Reviewed-by: NTim Hudson <tjh@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 92d23b33
...@@ -113,6 +113,8 @@ ...@@ -113,6 +113,8 @@
#include <openssl/ui.h> #include <openssl/ui.h>
#include <openssl/crypto.h> #include <openssl/crypto.h>
#ifndef OPENSSL_NO_UI
#ifndef BUFSIZ #ifndef BUFSIZ
#define BUFSIZ 256 #define BUFSIZ 256
#endif #endif
...@@ -141,3 +143,4 @@ int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2, ...@@ -141,3 +143,4 @@ int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2,
OPENSSL_cleanse(buff, BUFSIZ); OPENSSL_cleanse(buff, BUFSIZ);
return (ok); return (ok);
} }
#endif
...@@ -220,9 +220,11 @@ void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out, ...@@ -220,9 +220,11 @@ void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out,
long length, DES_key_schedule *schedule, long length, DES_key_schedule *schedule,
DES_cblock *ivec, int *num); DES_cblock *ivec, int *num);
#ifndef OPENSSL_NO_UI
int DES_read_password(DES_cblock *key, const char *prompt, int verify); int DES_read_password(DES_cblock *key, const char *prompt, int verify);
int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2, int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2,
const char *prompt, int verify); const char *prompt, int verify);
#endif
# define DES_fixup_key_parity DES_set_odd_parity # define DES_fixup_key_parity DES_set_odd_parity
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册