From 75dd6c1a39c4e73de7d8d782adb7008645248f50 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 20 May 2016 11:53:26 +0100 Subject: 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 --- apps/apps.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/apps.h') 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. -- cgit v1.2.3