]>
Commit | Line | Data |
---|---|---|
30ffe6fd CS |
1 | diff -urN openssh-4.7p1.orig/ssh-add.c openssh-4.7p1/ssh-add.c |
2 | --- openssh-4.7p1.orig/ssh-add.c 2007-09-06 15:16:42.472974134 +0200 | |
3 | +++ openssh-4.7p1/ssh-add.c 2007-09-06 15:21:26.489159294 +0200 | |
4 | @@ -42,6 +42,7 @@ | |
5 | #include <sys/param.h> | |
6 | ||
7 | #include <openssl/evp.h> | |
8 | +#include <openssl/engine.h> | |
9 | ||
10 | #include <fcntl.h> | |
11 | #include <pwd.h> | |
12 | @@ -343,7 +344,11 @@ | |
13 | ||
14 | SSLeay_add_all_algorithms(); | |
15 | ||
16 | - /* At first, get a connection to the authentication agent. */ | |
17 | + /* Init available hardware crypto engines. */ | |
18 | + ENGINE_load_builtin_engines(); | |
19 | + ENGINE_register_all_complete(); | |
20 | + ENGINE_set_default_ciphers(ENGINE_by_id("padlock")); | |
21 | + | |
22 | ac = ssh_get_authentication_connection(); | |
23 | if (ac == NULL) { | |
24 | fprintf(stderr, | |
25 | diff -urN openssh-4.7p1.orig/ssh-agent.c openssh-4.7p1/ssh-agent.c | |
26 | --- openssh-4.7p1.orig/ssh-agent.c 2007-09-06 15:16:42.472974134 +0200 | |
27 | +++ openssh-4.7p1/ssh-agent.c 2007-09-06 15:23:21.495713144 +0200 | |
28 | @@ -51,6 +51,7 @@ | |
29 | ||
30 | #include <openssl/evp.h> | |
31 | #include <openssl/md5.h> | |
32 | +#include <openssl/engine.h> | |
33 | ||
34 | #include <errno.h> | |
35 | #include <fcntl.h> | |
36 | @@ -1061,6 +1062,11 @@ | |
37 | ||
38 | SSLeay_add_all_algorithms(); | |
39 | ||
40 | + /* Init available hardware crypto engines. */ | |
41 | + ENGINE_load_builtin_engines(); | |
42 | + ENGINE_register_all_complete(); | |
43 | + ENGINE_set_default_ciphers(ENGINE_by_id("padlock")); | |
44 | + | |
45 | __progname = ssh_get_progname(av[0]); | |
46 | init_rng(); | |
47 | seed_rng(); | |
48 | diff -urN openssh-4.7p1.orig/ssh.c openssh-4.7p1/ssh.c | |
49 | --- openssh-4.7p1.orig/ssh.c 2007-09-06 15:16:42.472974134 +0200 | |
50 | +++ openssh-4.7p1/ssh.c 2007-09-06 15:24:18.498961574 +0200 | |
51 | @@ -72,6 +72,7 @@ | |
52 | ||
53 | #include <openssl/evp.h> | |
54 | #include <openssl/err.h> | |
55 | +#include <openssl/engine.h> | |
56 | ||
57 | #include "xmalloc.h" | |
58 | #include "ssh.h" | |
59 | @@ -560,6 +561,11 @@ | |
60 | SSLeay_add_all_algorithms(); | |
61 | ERR_load_crypto_strings(); | |
62 | ||
63 | + /* Init available hardware crypto engines. */ | |
64 | + ENGINE_load_builtin_engines(); | |
65 | + ENGINE_register_all_complete(); | |
66 | + ENGINE_set_default_ciphers(ENGINE_by_id("padlock")); | |
67 | + | |
68 | /* Initialize the command to execute on remote host. */ | |
69 | buffer_init(&command); | |
70 | ||
71 | diff -urN openssh-4.7p1.orig/sshd.c openssh-4.7p1/sshd.c | |
72 | --- openssh-4.7p1.orig/sshd.c 2007-09-06 15:16:42.472974134 +0200 | |
73 | +++ openssh-4.7p1/sshd.c 2007-09-06 15:25:03.001497629 +0200 | |
74 | @@ -75,6 +75,7 @@ | |
75 | #include <openssl/bn.h> | |
76 | #include <openssl/md5.h> | |
77 | #include <openssl/rand.h> | |
78 | +#include <openssl/engine.h> | |
79 | #ifdef HAVE_SECUREWARE | |
80 | #include <sys/security.h> | |
81 | #include <prot.h> | |
82 | @@ -1376,6 +1377,11 @@ | |
83 | ||
84 | SSLeay_add_all_algorithms(); | |
85 | ||
86 | + /* Init available hardware crypto engines. */ | |
87 | + ENGINE_load_builtin_engines(); | |
88 | + ENGINE_register_all_complete(); | |
89 | + ENGINE_set_default_ciphers(ENGINE_by_id("padlock")); | |
90 | + | |
91 | /* | |
92 | * Force logging to stderr until we have loaded the private host | |
93 | * key (unless started from inetd) | |
94 | diff -urN openssh-4.7p1.orig/ssh-keygen.c openssh-4.7p1/ssh-keygen.c | |
95 | --- openssh-4.7p1.orig/ssh-keygen.c 2007-09-06 15:16:42.472974134 +0200 | |
96 | +++ openssh-4.7p1/ssh-keygen.c 2007-09-06 15:25:52.982847129 +0200 | |
97 | @@ -21,6 +21,7 @@ | |
98 | ||
99 | #include <openssl/evp.h> | |
100 | #include <openssl/pem.h> | |
101 | +#include <openssl/engine.h> | |
102 | ||
103 | #include <errno.h> | |
104 | #include <fcntl.h> | |
105 | @@ -1073,6 +1074,12 @@ | |
106 | __progname = ssh_get_progname(argv[0]); | |
107 | ||
108 | SSLeay_add_all_algorithms(); | |
109 | + | |
110 | + /* Init available hardware crypto engines. */ | |
111 | + ENGINE_load_builtin_engines(); | |
112 | + ENGINE_register_all_complete(); | |
113 | + ENGINE_set_default_ciphers(ENGINE_by_id("padlock")); | |
114 | + | |
115 | log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); | |
116 | ||
117 | init_rng(); | |
118 | diff -urN openssh-4.7p1.orig/ssh-keysign.c openssh-4.7p1/ssh-keysign.c | |
119 | --- openssh-4.7p1.orig/ssh-keysign.c 2007-09-06 15:16:42.472974134 +0200 | |
120 | +++ openssh-4.7p1/ssh-keysign.c 2007-09-06 15:26:18.971328869 +0200 | |
121 | @@ -38,6 +38,7 @@ | |
122 | #include <openssl/evp.h> | |
123 | #include <openssl/rand.h> | |
124 | #include <openssl/rsa.h> | |
125 | +#include <openssl/engine.h> | |
126 | ||
127 | #include "xmalloc.h" | |
128 | #include "log.h" | |
129 | @@ -195,6 +196,12 @@ | |
130 | fatal("could not open any host key"); | |
131 | ||
132 | SSLeay_add_all_algorithms(); | |
133 | + | |
134 | + /* Init available hardware crypto engines. */ | |
135 | + ENGINE_load_builtin_engines(); | |
136 | + ENGINE_register_all_complete(); | |
137 | + ENGINE_set_default_ciphers(ENGINE_by_id("padlock")); | |
138 | + | |
139 | for (i = 0; i < 256; i++) | |
140 | rnd[i] = arc4random(); | |
141 | RAND_seed(rnd, sizeof(rnd)); |