diff options
author | Darren Tucker <dtucker@zip.com.au> | 2014-02-13 16:38:32 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2014-02-13 16:38:32 +1100 |
commit | 4a20959d2e3c90e9d66897c0b4032c785672d815 (patch) | |
tree | aa00a0f1a9106d0f4ff4905e350a5a668b576755 | |
parent | d1a7a9c0fd1ac2e3314cceb2891959fd2cd9eabb (diff) |
- (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}] Add compat
code for older OpenSSL versions that don't have EVP_MD_CTX_copy_ex.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | openbsd-compat/openssl-compat.c | 10 | ||||
-rw-r--r-- | openbsd-compat/openssl-compat.h | 6 |
4 files changed, 21 insertions, 4 deletions
@@ -1,3 +1,7 @@ | |||
1 | 20140213 | ||
2 | - (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}] Add compat | ||
3 | code for older OpenSSL versions that don't have EVP_MD_CTX_copy_ex. | ||
4 | |||
1 | 20140207 | 5 | 20140207 |
2 | - OpenBSD CVS Sync | 6 | - OpenBSD CVS Sync |
3 | - naddy@cvs.openbsd.org 2014/02/05 20:13:25 | 7 | - naddy@cvs.openbsd.org 2014/02/05 20:13:25 |
diff --git a/configure.ac b/configure.ac index a350a2a55..0dd3f4541 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.569 2014/02/04 00:18:21 djm Exp $ | 1 | # $Id: configure.ac,v 1.570 2014/02/13 05:38:33 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.569 $) | 18 | AC_REVISION($Revision: 1.570 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | AC_LANG([C]) | 20 | AC_LANG([C]) |
21 | 21 | ||
@@ -2430,6 +2430,7 @@ AC_CHECK_FUNCS([ \ | |||
2430 | EVP_DigestFinal_ex \ | 2430 | EVP_DigestFinal_ex \ |
2431 | EVP_MD_CTX_init \ | 2431 | EVP_MD_CTX_init \ |
2432 | EVP_MD_CTX_cleanup \ | 2432 | EVP_MD_CTX_cleanup \ |
2433 | EVP_MD_CTX_copy_ex \ | ||
2433 | HMAC_CTX_init \ | 2434 | HMAC_CTX_init \ |
2434 | RSA_generate_key_ex \ | 2435 | RSA_generate_key_ex \ |
2435 | RSA_get_default_method \ | 2436 | RSA_get_default_method \ |
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c index 60eac4b17..885c121f2 100644 --- a/openbsd-compat/openssl-compat.c +++ b/openbsd-compat/openssl-compat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: openssl-compat.c,v 1.16 2014/01/17 07:00:41 dtucker Exp $ */ | 1 | /* $Id: openssl-compat.c,v 1.17 2014/02/13 05:38:33 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> |
@@ -96,6 +96,14 @@ ssh_EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt) | |||
96 | } | 96 | } |
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | #ifndef HAVE_EVP_MD_CTX_COPY_EX | ||
100 | int | ||
101 | EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) | ||
102 | { | ||
103 | return EVP_MD_CTX_copy(out, in); | ||
104 | } | ||
105 | #endif | ||
106 | |||
99 | #ifndef HAVE_BN_IS_PRIME_EX | 107 | #ifndef HAVE_BN_IS_PRIME_EX |
100 | int | 108 | int |
101 | BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, void *cb) | 109 | BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, void *cb) |
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index 021ea98f5..276b9706d 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: openssl-compat.h,v 1.25 2014/01/17 06:32:31 dtucker Exp $ */ | 1 | /* $Id: openssl-compat.h,v 1.26 2014/02/13 05:38:33 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> |
@@ -156,6 +156,10 @@ int EVP_DigestInit_ex(EVP_MD_CTX *, const EVP_MD *, void *); | |||
156 | int EVP_DigestFinal_ex(EVP_MD_CTX *, unsigned char *, unsigned int *); | 156 | int EVP_DigestFinal_ex(EVP_MD_CTX *, unsigned char *, unsigned int *); |
157 | # endif | 157 | # endif |
158 | 158 | ||
159 | # ifndef EVP_MD_CTX_COPY_EX | ||
160 | int EVP_MD_CTX_copy_ex(EVP_MD_CTX *, const EVP_MD_CTX *); | ||
161 | # endif | ||
162 | |||
159 | int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *, | 163 | int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *, |
160 | unsigned char *, int); | 164 | unsigned char *, int); |
161 | int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int); | 165 | int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int); |