@@ -180,13 +180,6 @@ typedef unsigned int u_int;
180
180
# include <fcntl.h>
181
181
#endif
182
182
183
- /* Use Windows API with STD_INPUT_HANDLE when checking for input?
184
- Don't look at OPENSSL_SYS_MSDOS for this, since it is always defined if
185
- OPENSSL_SYS_WINDOWS is defined */
186
- #if defined(OPENSSL_SYS_WINDOWS ) && !defined(OPENSSL_SYS_WINCE ) && defined(STD_INPUT_HANDLE )
187
- #define OPENSSL_USE_STD_INPUT_HANDLE
188
- #endif
189
-
190
183
#undef PROG
191
184
#define PROG s_client_main
192
185
@@ -236,7 +229,6 @@ static BIO *bio_c_msg = NULL;
236
229
static int c_quiet = 0 ;
237
230
static int c_ign_eof = 0 ;
238
231
static int c_brief = 0 ;
239
- static int c_no_rand_screen = 0 ;
240
232
241
233
#ifndef OPENSSL_NO_PSK
242
234
/* Default PSK identity and key */
@@ -452,10 +444,6 @@ static void sc_usage(void)
452
444
" -keymatexport label - Export keying material using label\n" );
453
445
BIO_printf (bio_err ,
454
446
" -keymatexportlen len - Export len bytes of keying material (default 20)\n" );
455
- #ifdef OPENSSL_SYS_WINDOWS
456
- BIO_printf (bio_err ,
457
- " -no_rand_screen - Do not use RAND_screen() to initialize random state\n" );
458
- #endif
459
447
}
460
448
461
449
#ifndef OPENSSL_NO_TLSEXT
@@ -1149,10 +1137,6 @@ int MAIN(int argc, char **argv)
1149
1137
keymatexportlen = atoi (* (++ argv ));
1150
1138
if (keymatexportlen == 0 )
1151
1139
goto bad ;
1152
- #ifdef OPENSSL_SYS_WINDOWS
1153
- } else if (strcmp (* argv , "-no_rand_screen" ) == 0 ) {
1154
- c_no_rand_screen = 1 ;
1155
- #endif
1156
1140
} else {
1157
1141
BIO_printf (bio_err , "unknown option %s\n" , * argv );
1158
1142
badop = 1 ;
@@ -1269,7 +1253,7 @@ int MAIN(int argc, char **argv)
1269
1253
if (!load_excert (& exc , bio_err ))
1270
1254
goto end ;
1271
1255
1272
- if (!app_RAND_load_file (NULL , bio_err , ++ c_no_rand_screen ) && inrand == NULL
1256
+ if (!app_RAND_load_file (NULL, bio_err , 1 ) && inrand == NULL
1273
1257
&& !RAND_status ()) {
1274
1258
BIO_printf (bio_err ,
1275
1259
"warning , not much extra random data , consider using the - rand option \n ");
@@ -1809,16 +1793,17 @@ int MAIN(int argc, char **argv)
1809
1793
tv .tv_usec = 0 ;
1810
1794
i = select (width , (void * )& readfds , (void * )& writefds ,
1811
1795
NULL , & tv );
1812
- #if defined(OPENSSL_USE_STD_INPUT_HANDLE )
1796
+ # if defined(OPENSSL_SYS_WINCE ) || defined(OPENSSL_SYS_MSDOS )
1797
+ if (!i && (!_kbhit () || !read_tty ))
1798
+ continue ;
1799
+ # else
1813
1800
if (!i && (!((_kbhit ())
1814
1801
|| (WAIT_OBJECT_0 ==
1815
1802
WaitForSingleObject (GetStdHandle
1816
1803
(STD_INPUT_HANDLE ),
1817
1804
0 )))
1818
1805
|| !read_tty ))
1819
1806
continue ;
1820
- #else
1821
- if (!i && (!_kbhit () || !read_tty ) ) continue ;
1822
1807
# endif
1823
1808
} else
1824
1809
i = select (width , (void * )& readfds , (void * )& writefds ,
@@ -2020,12 +2005,12 @@ int MAIN(int argc, char **argv)
2020
2005
}
2021
2006
}
2022
2007
#if defined(OPENSSL_SYS_WINDOWS ) || defined(OPENSSL_SYS_MSDOS )
2023
- #if defined(OPENSSL_USE_STD_INPUT_HANDLE )
2008
+ # if defined(OPENSSL_SYS_WINCE ) || defined(OPENSSL_SYS_MSDOS )
2009
+ else if (_kbhit ())
2010
+ # else
2024
2011
else if ((_kbhit ())
2025
2012
|| (WAIT_OBJECT_0 ==
2026
2013
WaitForSingleObject (GetStdHandle (STD_INPUT_HANDLE ), 0 )))
2027
- #else
2028
- else if (_kbhit ())
2029
2014
# endif
2030
2015
#elif defined (OPENSSL_SYS_NETWARE )
2031
2016
else if (_kbhit ())
0 commit comments