diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | digest.c | 2 | ||||
-rw-r--r-- | openbsd-compat/openssl-compat.c | 30 | ||||
-rw-r--r-- | openbsd-compat/openssl-compat.h | 18 |
5 files changed, 57 insertions, 4 deletions
@@ -28,6 +28,9 @@ | |||
28 | [sandbox-systrace.c ssh-sandbox.h sshd.c] Support preauth sandboxing | 28 | [sandbox-systrace.c ssh-sandbox.h sshd.c] Support preauth sandboxing |
29 | using the Capsicum API introduced in FreeBSD 10. Patch by Dag-Erling | 29 | using the Capsicum API introduced in FreeBSD 10. Patch by Dag-Erling |
30 | Smorgrav, updated by Loganaden Velvindron @ AfriNIC; ok dtucker@ | 30 | Smorgrav, updated by Loganaden Velvindron @ AfriNIC; ok dtucker@ |
31 | - (dtucker) [configure.ac digest.c openbsd-compat/openssl-compat.c | ||
32 | openbsd-compat/openssl-compat.h] Add compatibility layer for older | ||
33 | openssl versions. ok djm@ | ||
31 | 34 | ||
32 | 20140118 | 35 | 20140118 |
33 | - (djm) OpenBSD CVS Sync | 36 | - (djm) OpenBSD CVS Sync |
diff --git a/configure.ac b/configure.ac index f14e177fc..2ac3afa38 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.550 2014/01/17 05:47:04 djm Exp $ | 1 | # $Id: configure.ac,v 1.551 2014/01/17 06:32:30 dtucker Exp $ |
2 | # | 2 | # |
3 | # Copyright (c) 1999-2004 Damien Miller | 3 | # Copyright (c) 1999-2004 Damien Miller |
4 | # | 4 | # |
@@ -15,7 +15,7 @@ | |||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | 16 | ||
17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) | 17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) |
18 | AC_REVISION($Revision: 1.550 $) | 18 | AC_REVISION($Revision: 1.551 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | AC_LANG([C]) | 20 | AC_LANG([C]) |
21 | 21 | ||
@@ -2357,6 +2357,10 @@ AC_LINK_IFELSE( | |||
2357 | AC_CHECK_FUNCS([ \ | 2357 | AC_CHECK_FUNCS([ \ |
2358 | BN_is_prime_ex \ | 2358 | BN_is_prime_ex \ |
2359 | DSA_generate_parameters_ex \ | 2359 | DSA_generate_parameters_ex \ |
2360 | EVP_DigestInit_ex \ | ||
2361 | EVP_DigestFinal_ex \ | ||
2362 | EVP_MD_CTX_init \ | ||
2363 | EVP_MD_CTX_cleanup \ | ||
2360 | HMAC_CTX_init \ | 2364 | HMAC_CTX_init \ |
2361 | RSA_generate_key_ex \ | 2365 | RSA_generate_key_ex \ |
2362 | RSA_get_default_method \ | 2366 | RSA_get_default_method \ |
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | #include <openssl/evp.h> | 25 | #include <openssl/evp.h> |
26 | 26 | ||
27 | #include "openbsd-compat/openssl-compat.h" | ||
28 | |||
27 | #include "buffer.h" | 29 | #include "buffer.h" |
28 | #include "digest.h" | 30 | #include "digest.h" |
29 | 31 | ||
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c index 5189cab61..52c7183f1 100644 --- a/openbsd-compat/openssl-compat.c +++ b/openbsd-compat/openssl-compat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: openssl-compat.c,v 1.14 2011/05/10 01:13:38 dtucker Exp $ */ | 1 | /* $Id: openssl-compat.c,v 1.15 2014/01/17 06:32:31 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> | 4 | * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> |
@@ -59,6 +59,34 @@ ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *evp) | |||
59 | } | 59 | } |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | #ifndef HAVE_EVP_DIGESTINIT_EX | ||
63 | int | ||
64 | EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *md, void *engine) | ||
65 | { | ||
66 | if (engine != NULL) | ||
67 | fatal("%s: ENGINE is not supported", __func__); | ||
68 | # ifdef OPENSSL_EVP_DIGESTUPDATE_VOID | ||
69 | EVP_DigestInit(ctx, md); | ||
70 | return 1; | ||
71 | # else | ||
72 | return EVP_DigestInit(ctx, md); | ||
73 | # endif | ||
74 | } | ||
75 | #endif | ||
76 | |||
77 | #ifndef HAVE_EVP_DISESTFINAL_EX | ||
78 | int | ||
79 | EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s) | ||
80 | { | ||
81 | # ifdef OPENSSL_EVP_DIGESTUPDATE_VOID | ||
82 | EVP_DigestFinal(ctx, md, s); | ||
83 | return 1; | ||
84 | # else | ||
85 | return EVP_DigestFinal(ctx, md, s); | ||
86 | # endif | ||
87 | } | ||
88 | #endif | ||
89 | |||
62 | #ifdef OPENSSL_EVP_DIGESTUPDATE_VOID | 90 | #ifdef OPENSSL_EVP_DIGESTUPDATE_VOID |
63 | int | 91 | int |
64 | ssh_EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt) | 92 | ssh_EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt) |
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index e7439b4e7..021ea98f5 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: openssl-compat.h,v 1.24 2013/02/12 00:00:40 djm Exp $ */ | 1 | /* $Id: openssl-compat.h,v 1.25 2014/01/17 06:32:31 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> | 4 | * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> |
@@ -148,6 +148,14 @@ int DSA_generate_parameters_ex(DSA *, int, const unsigned char *, int, int *, | |||
148 | int RSA_generate_key_ex(RSA *, int, BIGNUM *, void *); | 148 | int RSA_generate_key_ex(RSA *, int, BIGNUM *, void *); |
149 | # endif | 149 | # endif |
150 | 150 | ||
151 | # ifndef HAVE_EVP_DIGESTINIT_EX | ||
152 | int EVP_DigestInit_ex(EVP_MD_CTX *, const EVP_MD *, void *); | ||
153 | # endif | ||
154 | |||
155 | # ifndef HAVE_EVP_DISESTFINAL_EX | ||
156 | int EVP_DigestFinal_ex(EVP_MD_CTX *, unsigned char *, unsigned int *); | ||
157 | # endif | ||
158 | |||
151 | int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *, | 159 | int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *, |
152 | unsigned char *, int); | 160 | unsigned char *, int); |
153 | int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int); | 161 | int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int); |
@@ -158,5 +166,13 @@ void ssh_OpenSSL_add_all_algorithms(void); | |||
158 | # define HMAC_CTX_init(a) | 166 | # define HMAC_CTX_init(a) |
159 | # endif | 167 | # endif |
160 | 168 | ||
169 | # ifndef HAVE_EVP_MD_CTX_INIT | ||
170 | # define EVP_MD_CTX_init(a) | ||
171 | # endif | ||
172 | |||
173 | # ifndef HAVE_EVP_MD_CTX_CLEANUP | ||
174 | # define EVP_MD_CTX_cleanup(a) | ||
175 | # endif | ||
176 | |||
161 | #endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */ | 177 | #endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */ |
162 | 178 | ||