From c92d69fc2eb92ec7268756718ca013f2ac7fc5f4 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 12 Feb 2013 05:57:08 -0800 Subject: [PATCH] openssh-5.9p1-engines.diff =================================================================== --- ssh-add.c | 5 +++++ ssh-agent.c | 5 +++++ ssh-keygen.c | 6 ++++++ ssh-keysign.c | 6 ++++++ ssh.c | 5 +++++ sshd.c | 5 +++++ 6 files changed, 32 insertions(+) diff --git a/ssh-add.c b/ssh-add.c index 3421452..34c7e57 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -43,6 +43,7 @@ #include #include "openbsd-compat/openssl-compat.h" +#include #include #include @@ -427,6 +428,10 @@ main(int argc, char **argv) OpenSSL_add_all_algorithms(); + /* Init available hardware crypto engines. */ + ENGINE_load_builtin_engines(); + ENGINE_register_all_complete(); + /* At first, get a connection to the authentication agent. */ ac = ssh_get_authentication_connection(); if (ac == NULL) { diff --git a/ssh-agent.c b/ssh-agent.c index ba24612..d9996b0 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -51,6 +51,7 @@ #include #include "openbsd-compat/openssl-compat.h" +#include #include #include @@ -1047,6 +1048,10 @@ main(int ac, char **av) OpenSSL_add_all_algorithms(); + /* Init available hardware crypto engines. */ + ENGINE_load_builtin_engines(); + ENGINE_register_all_complete(); + __progname = ssh_get_progname(av[0]); seed_rng(); diff --git a/ssh-keygen.c b/ssh-keygen.c index 2a316bc..43ae2ec 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -22,6 +22,7 @@ #include #include #include "openbsd-compat/openssl-compat.h" +#include #include #include @@ -2232,6 +2233,11 @@ main(int argc, char **argv) __progname = ssh_get_progname(argv[0]); OpenSSL_add_all_algorithms(); + + /* Init available hardware crypto engines. */ + ENGINE_load_builtin_engines(); + ENGINE_register_all_complete(); + log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); seed_rng(); diff --git a/ssh-keysign.c b/ssh-keysign.c index 6bde8ad..4ab669e 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -38,6 +38,7 @@ #include #include #include +#include #include "xmalloc.h" #include "log.h" @@ -201,6 +202,11 @@ main(int argc, char **argv) fatal("could not open any host key"); OpenSSL_add_all_algorithms(); + + /* Init available hardware crypto engines. */ + ENGINE_load_builtin_engines(); + ENGINE_register_all_complete(); + for (i = 0; i < 256; i++) rnd[i] = arc4random(); RAND_seed(rnd, sizeof(rnd)); diff --git a/ssh.c b/ssh.c index 1e6cb90..09d700f 100644 --- a/ssh.c +++ b/ssh.c @@ -75,6 +75,7 @@ #include #include "openbsd-compat/openssl-compat.h" #include "openbsd-compat/sys-queue.h" +#include #include "xmalloc.h" #include "ssh.h" @@ -831,6 +832,10 @@ main(int ac, char **av) OpenSSL_add_all_algorithms(); ERR_load_crypto_strings(); + /* Init available hardware crypto engines. */ + ENGINE_load_builtin_engines(); + ENGINE_register_all_complete(); + /* Initialize the command to execute on remote host. */ buffer_init(&command); diff --git a/sshd.c b/sshd.c index 290d468..1c8c454 100644 --- a/sshd.c +++ b/sshd.c @@ -76,6 +76,7 @@ #include #include #include "openbsd-compat/openssl-compat.h" +#include #ifdef HAVE_SECUREWARE #include @@ -1562,6 +1563,10 @@ main(int ac, char **av) log_redirect_stderr_to(logfile); free(logfile); } + /* Init available hardware crypto engines. */ + ENGINE_load_builtin_engines(); + ENGINE_register_all_complete(); + /* * Force logging to stderr until we have loaded the private host * key (unless started from inetd) -- 2.7.4