summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/info.c7
-rw-r--r--apps/version.c36
2 files changed, 8 insertions, 35 deletions
diff --git a/apps/info.c b/apps/info.c
index a2c359e0f8..d67ed87df3 100644
--- a/apps/info.c
+++ b/apps/info.c
@@ -14,7 +14,7 @@
typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
OPT_CONFIGDIR, OPT_ENGINESDIR, OPT_MODULESDIR, OPT_DSOEXT, OPT_DIRNAMESEP,
- OPT_LISTSEP
+ OPT_LISTSEP, OPT_SEEDS
} OPTION_CHOICE;
const OPTIONS info_options[] = {
@@ -30,6 +30,7 @@ const OPTIONS info_options[] = {
{"dsoext", OPT_DSOEXT, '-', "Configured extension for modules"},
{"dirnamesep", OPT_DIRNAMESEP, '-', "Directory-filename separator"},
{"listsep", OPT_LISTSEP, '-', "List separator character"},
+ {"seeds", OPT_SEEDS, '-', "Seed sources"},
{NULL}
};
@@ -74,6 +75,10 @@ opthelp:
type = OPENSSL_INFO_LIST_SEPARATOR;
dirty++;
break;
+ case OPT_SEEDS:
+ type = OPENSSL_INFO_SEED_SOURCE;
+ dirty++;
+ break;
}
}
if (opt_num_rest() != 0) {
diff --git a/apps/version.c b/apps/version.c
index 35bfb95c09..caa3e76ffe 100644
--- a/apps/version.c
+++ b/apps/version.c
@@ -157,40 +157,8 @@ opthelp:
printf("%s\n", OpenSSL_version(OPENSSL_ENGINES_DIR));
if (moddir)
printf("%s\n", OpenSSL_version(OPENSSL_MODULES_DIR));
- if (seed) {
- printf("Seeding source:");
-#ifdef OPENSSL_RAND_SEED_RTDSC
- printf(" rtdsc");
-#endif
-#ifdef OPENSSL_RAND_SEED_RDCPU
- printf(" rdrand ( rdseed rdrand )");
-#endif
-#ifdef OPENSSL_RAND_SEED_LIBRANDOM
- printf(" C-library-random");
-#endif
-#ifdef OPENSSL_RAND_SEED_GETRANDOM
- printf(" getrandom-syscall");
-#endif
-#ifdef OPENSSL_RAND_SEED_DEVRANDOM
- {
- static const char *dev[] = { DEVRANDOM, NULL };
- printlist(" random-device", dev);
- }
-#endif
-#ifdef OPENSSL_RAND_SEED_EGD
- {
- static const char *dev[] = { DEVRANDOM_EGD, NULL };
- printlist(" EGD", dev);
- }
-#endif
-#ifdef OPENSSL_RAND_SEED_NONE
- printf(" none");
-#endif
-#ifdef OPENSSL_RAND_SEED_OS
- printf(" os-specific");
-#endif
- printf("\n");
- }
+ if (seed)
+ printf("Seeding source: %s\n", OPENSSL_info(OPENSSL_INFO_SEED_SOURCE));
ret = 0;
end:
return ret;