dh: Don't use deprecated function with newer OpenSSL
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
954da14c15
Коммит
509fa8a7b2
7
src/dh.c
7
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 */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user