Elide DES_read_password() for no-ui build
authorDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 21 Feb 2016 16:19:44 +0000 (16:19 +0000)
committerRich Salz <rsalz@openssl.org>
Mon, 7 Mar 2016 19:51:08 +0000 (14:51 -0500)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/des/read2pwd.c
include/openssl/des.h

index db31adb526c90566ec4b0224b306e494a08994d0..748d0e621b8793659d9dd54dd786374868f6858e 100644 (file)
 #include <openssl/ui.h>
 #include <openssl/crypto.h>
 
 #include <openssl/ui.h>
 #include <openssl/crypto.h>
 
+#ifndef OPENSSL_NO_UI
+
 #ifndef BUFSIZ
 #define BUFSIZ 256
 #endif
 #ifndef BUFSIZ
 #define BUFSIZ 256
 #endif
@@ -141,3 +143,4 @@ int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2,
     OPENSSL_cleanse(buff, BUFSIZ);
     return (ok);
 }
     OPENSSL_cleanse(buff, BUFSIZ);
     return (ok);
 }
+#endif
index 649bc792eed6319d1753463e3c3c28fab34ed39f..13ce23270379889f3db23c4b660502681ce4044c 100644 (file)
@@ -220,9 +220,11 @@ void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out,
                        long length, DES_key_schedule *schedule,
                        DES_cblock *ivec, int *num);
 
                        long length, DES_key_schedule *schedule,
                        DES_cblock *ivec, int *num);
 
+#ifndef OPENSSL_NO_UI
 int DES_read_password(DES_cblock *key, const char *prompt, int verify);
 int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2,
                         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,
                         const char *prompt, int verify);
+#endif
 
 # define DES_fixup_key_parity DES_set_odd_parity
 
 
 # define DES_fixup_key_parity DES_set_odd_parity