summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2018-11-23 10:40:06 +1100
committerDamien Miller <djm@mindrot.org>2018-11-23 10:42:05 +1100
commit42c5ec4b97b6a1bae70f323952d0646af16ce710 (patch)
tree6d85f7daebb7241b80bc91126f433dca62e850e8 /sftp.c
parent5b60b6c02009547a3e2a99d4886965de2a4719da (diff)
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 'sftp.c')
-rw-r--r--sftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sftp.c b/sftp.c
index ed95cf817..f886b330b 100644
--- a/sftp.c
+++ b/sftp.c
@@ -2367,6 +2367,8 @@ main(int argc, char **argv)
2367 sanitise_stdfd(); 2367 sanitise_stdfd();
2368 msetlocale(); 2368 msetlocale();
2369 2369
2370 seed_rng();
2371
2370 __progname = ssh_get_progname(argv[0]); 2372 __progname = ssh_get_progname(argv[0]);
2371 memset(&args, '\0', sizeof(args)); 2373 memset(&args, '\0', sizeof(args));
2372 args.list = NULL; 2374 args.list = NULL;