summaryrefslogtreecommitdiffstats
path: root/apps/apps.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-05-20 11:53:26 +0100
committerMatt Caswell <matt@openssl.org>2016-05-27 15:18:46 +0100
commit75dd6c1a39c4e73de7d8d782adb7008645248f50 (patch)
treee5c004d97e12eb00ba6e51e4938905b861788c74 /apps/apps.h
parent384f08dc76e4df2c004042bd9b1bad60f98c281f (diff)
Fix s_client/s_server waiting for stdin on Windows
On Windows we were using the function _kbhit() to determine whether there was input waiting in stdin for us to read. Actually all this does is work out whether there is a keyboard press event waiting to be processed in the input buffer. This only seems to work in a standard Windows console (not Msys console) and also doesn't work if you redirect the input from some other source (as we do in TLSProxy tests). This commit changes things to work differently depending on whether we are on the Windows console or not. RT#4255 Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/apps.h')
-rw-r--r--apps/apps.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/apps.h b/apps/apps.h
index 83dc0c157b..6a0acab58c 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -67,6 +67,9 @@ CONF *app_load_config_quiet(const char *filename);
int app_load_modules(const CONF *config);
void unbuffer(FILE *fp);
void wait_for_async(SSL *s);
+# if defined(OPENSSL_SYS_MSDOS)
+int has_stdin_waiting(void);
+# endif
/*
* Common verification options.