| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b312b79 commit b752630
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -124,7 +124,16 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn) | |||
| 124 | 124 | char buffer[200]; | |
| 125 | 125 | ||
| 126 | 126 | #ifdef OPENSSL_SYS_WINDOWS | |
| 127 | - RAND_screen(); | ||
| 127 | + /* | ||
| 128 | + * allocate 2 to dont_warn not to use RAND_screen() via | ||
| 129 | + * -no_rand_screen option in s_client | ||
| 130 | + */ | ||
| 131 | + if (dont_warn != 2) { | ||
| 132 | + BIO_printf(bio_e, "Loading 'screen' into random state -"); | ||
| 133 | + BIO_flush(bio_e); | ||
| 134 | + RAND_screen(); | ||
| 135 | + BIO_printf(bio_e, " done\n"); | ||
| 136 | + } | ||
| 128 | 137 | #endif | |
| 129 | 138 | ||
| 130 | 139 | if (file == NULL) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -236,6 +236,7 @@ static BIO *bio_c_msg = NULL; | |||
| 236 | 236 | static int c_quiet = 0; | |
| 237 | 237 | static int c_ign_eof = 0; | |
| 238 | 238 | static int c_brief = 0; | |
| 239 | + static int c_no_rand_screen = 0; | ||
| 239 | 240 | ||
| 240 | 241 | #ifndef OPENSSL_NO_PSK | |
| 241 | 242 | /* Default PSK identity and key */ | |
@@ -456,6 +457,10 @@ static void sc_usage(void) | |||
| 456 | 457 | " -keymatexport label - Export keying material using label\n"); | |
| 457 | 458 | BIO_printf(bio_err, | |
| 458 | 459 | " -keymatexportlen len - Export len bytes of keying material (default 20)\n"); | |
| 460 | + #ifdef OPENSSL_SYS_WINDOWS | ||
| 461 | + BIO_printf(bio_err, | ||
| 462 | + " -no_rand_screen - Do not use RAND_screen() to initialize random state\n"); | ||
| 463 | + #endif | ||
| 459 | 464 | } | |
| 460 | 465 | ||
| 461 | 466 | #ifndef OPENSSL_NO_TLSEXT | |
@@ -1135,6 +1140,10 @@ int MAIN(int argc, char **argv) | |||
| 1135 | 1140 | keymatexportlen = atoi(*(++argv)); | |
| 1136 | 1141 | if (keymatexportlen == 0) | |
| 1137 | 1142 | goto bad; | |
| 1143 | + #ifdef OPENSSL_SYS_WINDOWS | ||
| 1144 | + } else if (strcmp(*argv, "-no_rand_screen") == 0) { | ||
| 1145 | + c_no_rand_screen = 1; | ||
| 1146 | + #endif | ||
| 1138 | 1147 | } else { | |
| 1139 | 1148 | BIO_printf(bio_err, "unknown option %s\n", *argv); | |
| 1140 | 1149 | badop = 1; | |
@@ -1240,7 +1249,7 @@ int MAIN(int argc, char **argv) | |||
| 1240 | 1249 | if (!load_excert(&exc, bio_err)) | |
| 1241 | 1250 | goto end; | |
| 1242 | 1251 | ||
| 1243 | - if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL | ||
| 1252 | + if (!app_RAND_load_file(NULL, bio_err, ++c_no_rand_screen) && inrand == NULL | ||
| 1244 | 1253 | && !RAND_status()) { | |
| 1245 | 1254 | BIO_printf(bio_err, | |
| 1246 | 1255 | "warning, not much extra random data, consider using the -rand option\n"); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments