summaryrefslogtreecommitdiffstats
path: root/crypto/ui
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-05-13 04:59:09 +0000
committerRichard Levitte <levitte@openssl.org>2001-05-13 04:59:09 +0000
commit299053becdf147927c6cd4054e87c829aa06f245 (patch)
tree9df25f8b98fdc734a9722f50d1ff04b390e97167 /crypto/ui
parent1449bda052094fe5ad3cb6ff4dd60d0266eacb4c (diff)
des_read_password() and des_read_2passwords() can only appear if DES
is compiled.
Diffstat (limited to 'crypto/ui')
-rw-r--r--crypto/ui/ui_compat.c5
-rw-r--r--crypto/ui/ui_compat.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/crypto/ui/ui_compat.c b/crypto/ui/ui_compat.c
index f328bdc6c0..fd8e004c10 100644
--- a/crypto/ui/ui_compat.c
+++ b/crypto/ui/ui_compat.c
@@ -57,9 +57,9 @@
* [including the GNU Public Licence.]
*/
-#include <openssl/des.h>
-#include <openssl/ui.h>
+#include <openssl/ui_compat.h>
+#ifndef OPENSSL_NO_DES
int des_read_password(des_cblock *key, const char *prompt, int verify)
{
int ok;
@@ -84,6 +84,7 @@ int des_read_2passwords(des_cblock *key1, des_cblock *key2, const char *prompt,
memset(buff,0,BUFSIZ);
return(ok);
}
+#endif
int des_read_pw_string(char *buf,int length,const char *prompt,int verify)
{
diff --git a/crypto/ui/ui_compat.h b/crypto/ui/ui_compat.h
index 3b19b82072..519f3654b0 100644
--- a/crypto/ui/ui_compat.h
+++ b/crypto/ui/ui_compat.h
@@ -59,7 +59,11 @@
#ifndef HEADER_UI_COMPAT_H
#define HEADER_UI_COMPAT_H
+#include <openssl/opensslconf.h>
#include <openssl/ui.h>
+#ifndef OPENSSL_NO_DES
+#include <openssl/des.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -68,9 +72,11 @@ extern "C" {
/* The following functions were previously part of the DES section,
and are provided here for backward compatibility reasons. */
+#ifndef OPENSSL_NO_DES
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
int des_read_pw_string(char *buf,int length,const char *prompt,int verify);
int des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify);