@@ -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 */
@@ -449,10 +441,6 @@ static void sc_usage(void)
449
441
" -keymatexport label - Export keying material using label\n" );
450
442
BIO_printf (bio_err ,
451
443
" -keymatexportlen len - Export len bytes of keying material (default 20)\n" );
452
- #ifdef OPENSSL_SYS_WINDOWS
453
- BIO_printf (bio_err ,
454
- " -no_rand_screen - Do not use RAND_screen() to initialize random state\n" );
455
- #endif
456
444
}
457
445
458
446
#ifndef OPENSSL_NO_TLSEXT
@@ -1132,10 +1120,6 @@ int MAIN(int argc, char **argv)
1132
1120
keymatexportlen = atoi (* (++ argv ));
1133
1121
if (keymatexportlen == 0 )
1134
1122
goto bad ;
1135
- #ifdef OPENSSL_SYS_WINDOWS
1136
- } else if (strcmp (* argv , "-no_rand_screen" ) == 0 ) {
1137
- c_no_rand_screen = 1 ;
1138
- #endif
1139
1123
} else {
1140
1124
BIO_printf (bio_err , "unknown option %s\n" , * argv );
1141
1125
badop = 1 ;
@@ -1241,7 +1225,7 @@ int MAIN(int argc, char **argv)
1241
1225
if (!load_excert (& exc , bio_err ))
1242
1226
goto end ;
1243
1227
1244
- if (!app_RAND_load_file (NULL , bio_err , ++ c_no_rand_screen ) && inrand == NULL
1228
+ if (!app_RAND_load_file (NULL, bio_err , 1 ) && inrand == NULL
1245
1229
&& !RAND_status ()) {
1246
1230
BIO_printf (bio_err ,
1247
1231
"warning , not much extra random data , consider using the - rand option \n ");
@@ -1774,16 +1758,17 @@ int MAIN(int argc, char **argv)
1774
1758
tv .tv_usec = 0 ;
1775
1759
i = select (width , (void * )& readfds , (void * )& writefds ,
1776
1760
NULL , & tv );
1777
- #if defined(OPENSSL_USE_STD_INPUT_HANDLE )
1761
+ # if defined(OPENSSL_SYS_WINCE ) || defined(OPENSSL_SYS_MSDOS )
1762
+ if (!i && (!_kbhit () || !read_tty ))
1763
+ continue ;
1764
+ # else
1778
1765
if (!i && (!((_kbhit ())
1779
1766
|| (WAIT_OBJECT_0 ==
1780
1767
WaitForSingleObject (GetStdHandle
1781
1768
(STD_INPUT_HANDLE ),
1782
1769
0 )))
1783
1770
|| !read_tty ))
1784
1771
continue ;
1785
- #else
1786
- if (!i && (!_kbhit () || !read_tty ) ) continue ;
1787
1772
# endif
1788
1773
} else
1789
1774
i = select (width , (void * )& readfds , (void * )& writefds ,
@@ -1985,12 +1970,12 @@ int MAIN(int argc, char **argv)
1985
1970
}
1986
1971
}
1987
1972
#if defined(OPENSSL_SYS_WINDOWS ) || defined(OPENSSL_SYS_MSDOS )
1988
- #if defined(OPENSSL_USE_STD_INPUT_HANDLE )
1973
+ # if defined(OPENSSL_SYS_WINCE ) || defined(OPENSSL_SYS_MSDOS )
1974
+ else if (_kbhit ())
1975
+ # else
1989
1976
else if ((_kbhit ())
1990
1977
|| (WAIT_OBJECT_0 ==
1991
1978
WaitForSingleObject (GetStdHandle (STD_INPUT_HANDLE ), 0 )))
1992
- #else
1993
- else if (_kbhit ())
1994
1979
# endif
1995
1980
#elif defined (OPENSSL_SYS_NETWARE )
1996
1981
else if (_kbhit ())
0 commit comments