aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dh.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dh.c b/src/dh.c
index 0339be02..968af8ce 100644
--- a/src/dh.c
+++ b/src/dh.c
@@ -131,11 +131,18 @@ int ssh_get_random(void *where, int len, int strong){
return 1;
#elif defined HAVE_LIBCRYPTO
+# if OPENSSL_VERSION_NUMBER > 0x10100000L
+ /* variable not used in new libcrypto */
+ (void) strong;
+
+ return RAND_bytes(where, len);
+# else /* OPENSSL_VERSION_NUMBER */
if (strong) {
return RAND_bytes(where,len);
} else {
return RAND_pseudo_bytes(where,len);
}
+# endif /* OPENSSL_VERSION_NUMBER */
#endif
/* never reached */