diff options
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/openssl-compat.c | 14 | ||||
-rw-r--r-- | openbsd-compat/openssl-compat.h | 6 |
2 files changed, 18 insertions, 2 deletions
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c index eb5ae7f85..b617fdf19 100644 --- a/openbsd-compat/openssl-compat.c +++ b/openbsd-compat/openssl-compat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: openssl-compat.c,v 1.12 2010/12/04 21:46:05 dtucker Exp $ */ | 1 | /* $Id: openssl-compat.c,v 1.13 2011/01/21 22:37:06 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> |
@@ -26,6 +26,10 @@ | |||
26 | # include <openssl/conf.h> | 26 | # include <openssl/conf.h> |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #ifndef HAVE_RSA_GET_DEFAULT_METHOD | ||
30 | # include <openssl/rsa.h> | ||
31 | #endif | ||
32 | |||
29 | #include "log.h" | 33 | #include "log.h" |
30 | 34 | ||
31 | #define SSH_DONT_OVERLOAD_OPENSSL_FUNCS | 35 | #define SSH_DONT_OVERLOAD_OPENSSL_FUNCS |
@@ -120,6 +124,14 @@ DSA_generate_parameters_ex(DSA *dsa, int bits, const unsigned char *seed, | |||
120 | } | 124 | } |
121 | #endif | 125 | #endif |
122 | 126 | ||
127 | #ifndef HAVE_RSA_GET_DEFAULT_METHOD | ||
128 | RSA_METHOD * | ||
129 | RSA_get_default_method(void) | ||
130 | { | ||
131 | return RSA_PKCS1_SSLeay(); | ||
132 | } | ||
133 | #endif | ||
134 | |||
123 | #ifdef USE_OPENSSL_ENGINE | 135 | #ifdef USE_OPENSSL_ENGINE |
124 | void | 136 | void |
125 | ssh_SSLeay_add_all_algorithms(void) | 137 | ssh_SSLeay_add_all_algorithms(void) |
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index c0ca20aaf..6d4f3f215 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: openssl-compat.h,v 1.17 2010/12/04 12:20:50 dtucker Exp $ */ | 1 | /* $Id: openssl-compat.h,v 1.18 2011/01/21 22:37:06 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> |
@@ -78,6 +78,10 @@ extern const EVP_CIPHER *evp_acss(void); | |||
78 | # define EVP_CIPHER_CTX_key_length(c) ((c)->key_len) | 78 | # define EVP_CIPHER_CTX_key_length(c) ((c)->key_len) |
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | #ifndef HAVE_RSA_GET_DEFAULT_METHOD | ||
82 | RSA_METHOD *RSA_get_default_method(void); | ||
83 | #endif | ||
84 | |||
81 | /* | 85 | /* |
82 | * We overload some of the OpenSSL crypto functions with ssh_* equivalents | 86 | * We overload some of the OpenSSL crypto functions with ssh_* equivalents |
83 | * which cater for older and/or less featureful OpenSSL version. | 87 | * which cater for older and/or less featureful OpenSSL version. |