summaryrefslogtreecommitdiffstats
path: root/crypto/des
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-11-15 22:37:18 +0000
committerRichard Levitte <levitte@openssl.org>2002-11-15 22:37:18 +0000
commit0bf23d9b2055223c6e7a1398d2243a65dfa4c30d (patch)
treecd3b00d88ebc55c0ea232b6f43200097f20a16de /crypto/des
parent813f256783a678b131a81ed1c8d05b70395a6255 (diff)
WinCE patches
Diffstat (limited to 'crypto/des')
-rw-r--r--crypto/des/read2pwd.c3
-rw-r--r--crypto/des/read_pwd.c38
2 files changed, 27 insertions, 14 deletions
diff --git a/crypto/des/read2pwd.c b/crypto/des/read2pwd.c
index b4720c3a98..241adfa342 100644
--- a/crypto/des/read2pwd.c
+++ b/crypto/des/read2pwd.c
@@ -112,6 +112,9 @@
#include <string.h>
#include <openssl/des.h>
#include <openssl/ui.h>
+#ifdef OPENSSL_SYS_WINCE
+#include <stdio_extras.h> /* BUFSIZ */
+#endif
int DES_read_password(DES_cblock *key, const char *prompt, int verify)
{
diff --git a/crypto/des/read_pwd.c b/crypto/des/read_pwd.c
index b893a1b03a..c79c9a0e2a 100644
--- a/crypto/des/read_pwd.c
+++ b/crypto/des/read_pwd.c
@@ -101,8 +101,10 @@
#ifdef WIN_CONSOLE_BUG
#include <windows.h>
+#ifndef OPENSSL_SYS_WINCE
#include <wincon.h>
#endif
+#endif
/* There are 5 types of terminal interface supported,
@@ -167,7 +169,7 @@
#include <sys/ioctl.h>
#endif
-#if defined(OPENSSL_SYS_MSDOS) && !defined(__CYGWIN32__)
+#if defined(OPENSSL_SYS_MSDOS) && !defined(__CYGWIN32__) && !defined(OPENSSL_SYS_WINCE)
#include <conio.h>
#define fgets(a,b,c) noecho_fgets(a,b,c)
#endif
@@ -222,7 +224,25 @@ int des_read_pw_string(char *buf, int length, const char *prompt,
return(ret);
}
-#ifndef OPENSSL_SYS_WIN16
+#ifdef OPENSSL_SYS_WINCE
+
+int des_read_pw(char *buf, char *buff, int size, const char *prompt, int verify)
+ {
+ memset(buf,0,size);
+ memset(buff,0,size);
+ return(0);
+ }
+
+#elif defined(OPENSSL_SYS_WIN16)
+
+int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify)
+ {
+ memset(buf,0,size);
+ memset(buff,0,size);
+ return(0);
+ }
+
+#else /* !OPENSSL_SYS_WINCE && !OPENSSL_SYS_WIN16 */
static void read_till_nl(FILE *in)
{
@@ -393,17 +413,6 @@ error:
return(!ok);
}
-#else /* OPENSSL_SYS_WIN16 */
-
-int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify)
- {
- memset(buf,0,size);
- memset(buff,0,size);
- return(0);
- }
-
-#endif
-
static void pushsig(void)
{
int i;
@@ -466,7 +475,7 @@ static void recsig(int i)
#endif
}
-#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN16)
+#ifdef OPENSSL_SYS_MSDOS
static int noecho_fgets(char *buf, int size, FILE *tty)
{
int i;
@@ -509,3 +518,4 @@ static int noecho_fgets(char *buf, int size, FILE *tty)
return(strlen(buf));
}
#endif
+#endif /* !OPENSSL_SYS_WINCE && !WIN16 */