diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2017-10-29 16:14:35 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2017-10-29 16:15:33 +0100 |
commit | 509fa8a7b25eeb2b0f62ca158876603d96b49481 (patch) | |
tree | 34ca1ed0df67453e7115c42208e9399d4c708671 /src/dh.c | |
parent | 954da14c150771857b095f108995d41f843f950d (diff) | |
download | libssh-509fa8a7b25eeb2b0f62ca158876603d96b49481.tar.gz libssh-509fa8a7b25eeb2b0f62ca158876603d96b49481.tar.xz libssh-509fa8a7b25eeb2b0f62ca158876603d96b49481.zip |
dh: Don't use deprecated function with newer OpenSSL
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/dh.c')
-rw-r--r-- | src/dh.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 */ |