19 #ifndef _OPENSSL_COMPAT_H 20 #define _OPENSSL_COMPAT_H 25 #include <openssl/opensslv.h> 26 #include <openssl/evp.h> 27 #include <openssl/rsa.h> 28 #include <openssl/dsa.h> 30 int ssh_compatible_openssl(
long,
long);
32 #if (OPENSSL_VERSION_NUMBER <= 0x0090805fL) 33 # error OpenSSL 0.9.8f or greater is required 36 #if OPENSSL_VERSION_NUMBER < 0x10000001L 37 # define LIBCRYPTO_EVP_INL_TYPE unsigned int 39 # define LIBCRYPTO_EVP_INL_TYPE size_t 42 #ifndef OPENSSL_RSA_MAX_MODULUS_BITS 43 # define OPENSSL_RSA_MAX_MODULUS_BITS 16384 45 #ifndef OPENSSL_DSA_MAX_MODULUS_BITS 46 # define OPENSSL_DSA_MAX_MODULUS_BITS 10000 49 #ifndef OPENSSL_HAVE_EVPCTR 50 # define EVP_aes_128_ctr evp_aes_128_ctr 51 # define EVP_aes_192_ctr evp_aes_128_ctr 52 # define EVP_aes_256_ctr evp_aes_128_ctr 53 const EVP_CIPHER *evp_aes_128_ctr(
void);
54 void ssh_aes_ctr_iv(EVP_CIPHER_CTX *,
int, u_char *,
size_t);
58 #if !defined(OPENSSL_HAVE_EVPGCM) && !defined(EVP_CTRL_GCM_SET_IV_FIXED) 59 # define EVP_CTRL_GCM_SET_IV_FIXED -1 60 # define EVP_CTRL_GCM_IV_GEN -1 61 # define EVP_CTRL_GCM_SET_TAG -1 62 # define EVP_CTRL_GCM_GET_TAG -1 66 #ifndef HAVE_EVP_CIPHER_CTX_CTRL 67 # ifdef OPENSSL_HAVE_EVPGCM 68 # error AES-GCM enabled without EVP_CIPHER_CTX_ctrl 70 # define EVP_CIPHER_CTX_ctrl(a,b,c,d) (0) 82 #ifndef SSH_DONT_OVERLOAD_OPENSSL_FUNCS 84 # ifdef USE_OPENSSL_ENGINE 85 # ifdef OpenSSL_add_all_algorithms 86 # undef OpenSSL_add_all_algorithms 88 # define OpenSSL_add_all_algorithms() ssh_OpenSSL_add_all_algorithms() 91 void ssh_OpenSSL_add_all_algorithms(
void);