diff options
author | Colin Watson <cjwatson@debian.org> | 2011-01-24 11:46:57 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2011-01-24 11:46:57 +0000 |
commit | 0970072c89b079b022538e3c366fbfa2c53fc821 (patch) | |
tree | b7024712d74234bb5a8b036ccbc9109e2e211296 /openbsd-compat/openssl-compat.h | |
parent | 4e8aa4da57000c7bba8e5c49163bc0c0ca383f78 (diff) | |
parent | 478ff799463ca926a8dfbabf058f4e84aaffc65a (diff) |
merge 5.7p1
Diffstat (limited to 'openbsd-compat/openssl-compat.h')
-rw-r--r-- | openbsd-compat/openssl-compat.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index b7caa650c..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.15 2010/05/12 07:50:02 djm 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> |
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include "includes.h" | 19 | #include "includes.h" |
20 | #include <openssl/opensslv.h> | ||
20 | #include <openssl/evp.h> | 21 | #include <openssl/evp.h> |
21 | #include <openssl/rsa.h> | 22 | #include <openssl/rsa.h> |
22 | #include <openssl/dsa.h> | 23 | #include <openssl/dsa.h> |
@@ -39,6 +40,12 @@ | |||
39 | # define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) | 40 | # define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) |
40 | #endif | 41 | #endif |
41 | 42 | ||
43 | #if OPENSSL_VERSION_NUMBER < 0x1000000fL | ||
44 | # define LIBCRYPTO_EVP_INL_TYPE unsigned int | ||
45 | #else | ||
46 | # define LIBCRYPTO_EVP_INL_TYPE size_t | ||
47 | #endif | ||
48 | |||
42 | #if (OPENSSL_VERSION_NUMBER < 0x00907000L) || defined(OPENSSL_LOBOTOMISED_AES) | 49 | #if (OPENSSL_VERSION_NUMBER < 0x00907000L) || defined(OPENSSL_LOBOTOMISED_AES) |
43 | # define USE_BUILTIN_RIJNDAEL | 50 | # define USE_BUILTIN_RIJNDAEL |
44 | #endif | 51 | #endif |
@@ -71,6 +78,10 @@ extern const EVP_CIPHER *evp_acss(void); | |||
71 | # define EVP_CIPHER_CTX_key_length(c) ((c)->key_len) | 78 | # define EVP_CIPHER_CTX_key_length(c) ((c)->key_len) |
72 | #endif | 79 | #endif |
73 | 80 | ||
81 | #ifndef HAVE_RSA_GET_DEFAULT_METHOD | ||
82 | RSA_METHOD *RSA_get_default_method(void); | ||
83 | #endif | ||
84 | |||
74 | /* | 85 | /* |
75 | * We overload some of the OpenSSL crypto functions with ssh_* equivalents | 86 | * We overload some of the OpenSSL crypto functions with ssh_* equivalents |
76 | * which cater for older and/or less featureful OpenSSL version. | 87 | * which cater for older and/or less featureful OpenSSL version. |
@@ -101,6 +112,19 @@ extern const EVP_CIPHER *evp_acss(void); | |||
101 | # define SSLeay_add_all_algorithms() ssh_SSLeay_add_all_algorithms() | 112 | # define SSLeay_add_all_algorithms() ssh_SSLeay_add_all_algorithms() |
102 | # endif | 113 | # endif |
103 | 114 | ||
115 | # ifndef HAVE_BN_IS_PRIME_EX | ||
116 | int BN_is_prime_ex(const BIGNUM *, int, BN_CTX *, void *); | ||
117 | # endif | ||
118 | |||
119 | # ifndef HAVE_DSA_GENERATE_PARAMETERS_EX | ||
120 | int DSA_generate_parameters_ex(DSA *, int, const unsigned char *, int, int *, | ||
121 | unsigned long *, void *); | ||
122 | # endif | ||
123 | |||
124 | # ifndef HAVE_RSA_GENERATE_KEY_EX | ||
125 | int RSA_generate_key_ex(RSA *, int, BIGNUM *, void *); | ||
126 | # endif | ||
127 | |||
104 | int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *, | 128 | int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *, |
105 | unsigned char *, int); | 129 | unsigned char *, int); |
106 | int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int); | 130 | int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int); |