summaryrefslogtreecommitdiffstats
path: root/ssh_api.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2018-11-23 00:40:06 +0100
committerDamien Miller <djm@mindrot.org>2018-11-23 00:42:05 +0100
commit42c5ec4b97b6a1bae70f323952d0646af16ce710 (patch)
tree6d85f7daebb7241b80bc91126f433dca62e850e8 /ssh_api.c
parentupstream: Output info on SIGUSR1 as well as (diff)
downloadopenssh-42c5ec4b97b6a1bae70f323952d0646af16ce710.tar.xz
openssh-42c5ec4b97b6a1bae70f323952d0646af16ce710.zip
refactor libcrypto initialisation
Don't call OpenSSL_add_all_algorithms() unless OpenSSL actually supports it. Move all libcrypto initialisation to a single function, and call that from seed_rng() that is called early in each tool's main(). Prompted by patch from Rosen Penev
Diffstat (limited to 'ssh_api.c')
-rw-r--r--ssh_api.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ssh_api.c b/ssh_api.c
index e727c0d69..53bbc9b49 100644
--- a/ssh_api.c
+++ b/ssh_api.c
@@ -81,9 +81,7 @@ ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params)
int r;
if (!called) {
-#ifdef WITH_OPENSSL
- OpenSSL_add_all_algorithms();
-#endif /* WITH_OPENSSL */
+ seed_rng();
called = 1;
}