mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
Cleanup old OpenSSL 0.9.7 compatibility code
OpenSSL 0.9.7 is already not supported, so clean up the old legacy bits for that as well. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
e20fe54f3f
commit
7e99867533
@@ -60,10 +60,6 @@ typedef void *EVPCTX;
|
|||||||
|
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/opensslv.h>
|
#include <openssl/opensslv.h>
|
||||||
#define OPENSSL_0_9_7b 0x0090702fL
|
|
||||||
#if (OPENSSL_VERSION_NUMBER <= OPENSSL_0_9_7b)
|
|
||||||
#define BROKEN_AES_CTR
|
|
||||||
#endif
|
|
||||||
typedef BIGNUM* bignum;
|
typedef BIGNUM* bignum;
|
||||||
typedef const BIGNUM* const_bignum;
|
typedef const BIGNUM* const_bignum;
|
||||||
typedef BN_CTX* bignum_CTX;
|
typedef BN_CTX* bignum_CTX;
|
||||||
|
|||||||
@@ -80,13 +80,8 @@
|
|||||||
# else
|
# else
|
||||||
# define GCM ""
|
# define GCM ""
|
||||||
# endif /* HAVE_OPENSSL_EVP_AES_GCM */
|
# endif /* HAVE_OPENSSL_EVP_AES_GCM */
|
||||||
# ifdef BROKEN_AES_CTR
|
# define AES GCM "aes256-ctr,aes192-ctr,aes128-ctr,"
|
||||||
# define AES GCM
|
# define AES_CBC "aes256-cbc,aes192-cbc,aes128-cbc,"
|
||||||
# define AES_CBC "aes256-cbc,aes192-cbc,aes128-cbc,"
|
|
||||||
# else /* BROKEN_AES_CTR */
|
|
||||||
# define AES GCM "aes256-ctr,aes192-ctr,aes128-ctr,"
|
|
||||||
# define AES_CBC "aes256-cbc,aes192-cbc,aes128-cbc,"
|
|
||||||
# endif /* BROKEN_AES_CTR */
|
|
||||||
# else /* HAVE_OPENSSL_AES_H */
|
# else /* HAVE_OPENSSL_AES_H */
|
||||||
# define AES ""
|
# define AES ""
|
||||||
# define AES_CBC ""
|
# define AES_CBC ""
|
||||||
|
|||||||
@@ -1304,10 +1304,6 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_AES
|
#ifdef HAS_AES
|
||||||
#ifndef BROKEN_AES_CTR
|
|
||||||
/* OpenSSL until 0.9.7c has a broken AES_ctr128_encrypt implementation which
|
|
||||||
* increments the counter from 2^64 instead of 1. It's better not to use it
|
|
||||||
*/
|
|
||||||
#ifdef HAVE_OPENSSL_EVP_AES_CTR
|
#ifdef HAVE_OPENSSL_EVP_AES_CTR
|
||||||
{
|
{
|
||||||
.name = "aes128-ctr",
|
.name = "aes128-ctr",
|
||||||
@@ -1377,7 +1373,6 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
|
|||||||
.cleanup = aes_ctr_cleanup
|
.cleanup = aes_ctr_cleanup
|
||||||
},
|
},
|
||||||
#endif /* HAVE_OPENSSL_EVP_AES_CTR */
|
#endif /* HAVE_OPENSSL_EVP_AES_CTR */
|
||||||
#endif /* BROKEN_AES_CTR */
|
|
||||||
{
|
{
|
||||||
.name = "aes128-cbc",
|
.name = "aes128-cbc",
|
||||||
.blocksize = AES_BLOCK_SIZE,
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
|
|||||||
Reference in New Issue
Block a user