[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Tue Aug 15 20:46:49 UTC 2017
The branch master has been updated
via b35ef02628b48d7041cdb8961e931dbe5e10d169 (commit)
from 1fcb6a3daa3da1f6baa4cc5b4092642c6bf5103c (commit)
- Log -----------------------------------------------------------------
commit b35ef02628b48d7041cdb8961e931dbe5e10d169
Author: Rich Salz <rsalz at openssl.org>
Date: Tue Aug 15 15:50:14 2017 -0400
Print pathnames for 'version -r'
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4168)
-----------------------------------------------------------------------
Summary of changes:
apps/version.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/apps/version.c b/apps/version.c
index 298d837..c9727da 100644
--- a/apps/version.c
+++ b/apps/version.c
@@ -49,6 +49,16 @@ const OPTIONS version_options[] = {
{NULL}
};
+#if defined(OPENSSL_RAND_SEED_DEVRANDOM) || defined(OPENSSL_RAND_SEED_EGD)
+static void printlist(const char *prefix, const char **dev)
+{
+ printf("%s (", prefix);
+ for ( ; *dev != NULL; dev++)
+ printf(" \"%s\"", *dev);
+ printf(" )");
+}
+#endif
+
int version_main(int argc, char **argv)
{
int ret = 1, dirty = 0, seed = 0;
@@ -143,7 +153,7 @@ int version_main(int argc, char **argv)
printf(" rtdsc");
#endif
#ifdef OPENSSL_RAND_SEED_RDCPU
- printf(" rdrand-hardware");
+ printf(" rdrand ( rdseed rdrand )");
#endif
#ifdef OPENSSL_RAND_SEED_LIBRANDOM
printf(" C-library-random");
@@ -152,10 +162,16 @@ int version_main(int argc, char **argv)
printf(" getrandom-syscall");
#endif
#ifdef OPENSSL_RAND_SEED_DEVRANDOM
- printf(" random-device");
+ {
+ static const char *dev[] = { DEVRANDOM, NULL };
+ printlist(" random-device", dev);
+ }
#endif
#ifdef OPENSSL_RAND_SEED_EGD
- printf(" EGD");
+ {
+ static const char *dev[] = { DEVRANDOM_EGD, NULL };
+ printlist(" EGD", dev);
+ }
#endif
#ifdef OPENSSL_RAND_SEED_NONE
printf(" none");
More information about the openssl-commits
mailing list