aboutsummaryrefslogtreecommitdiff
path: root/src/libcrypto.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-12-16 13:32:42 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-12-19 14:57:29 +0100
commitdea6fe3d895d3ddfa23d67b07c3dccdbb2839366 (patch)
tree35b81c61107a81b6317e06146363f840de14f666 /src/libcrypto.c
parent6cd8d4a24aa067d16611eb64bf306b7853748f34 (diff)
downloadlibssh-dea6fe3d895d3ddfa23d67b07c3dccdbb2839366.tar.gz
libssh-dea6fe3d895d3ddfa23d67b07c3dccdbb2839366.tar.xz
libssh-dea6fe3d895d3ddfa23d67b07c3dccdbb2839366.zip
crypto: Disable blowfish support by default
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src/libcrypto.c')
-rw-r--r--src/libcrypto.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcrypto.c b/src/libcrypto.c
index 9d8ff3b0..c2d91cdd 100644
--- a/src/libcrypto.c
+++ b/src/libcrypto.c
@@ -514,10 +514,12 @@ static void evp_cipher_init(struct ssh_cipher_struct *cipher) {
case SSH_3DES_CBC:
cipher->cipher = EVP_des_ede3_cbc();
break;
+#ifdef WITH_BLOWFISH_CIPHER
case SSH_BLOWFISH_CBC:
cipher->cipher = EVP_bf_cbc();
break;
/* ciphers not using EVP */
+#endif
case SSH_AEAD_CHACHA20_POLY1305:
SSH_LOG(SSH_LOG_WARNING, "The ChaCha cipher cannot be handled here");
break;
@@ -881,6 +883,7 @@ evp_cipher_aead_decrypt(struct ssh_cipher_struct *cipher,
* The table of supported ciphers
*/
static struct ssh_cipher_struct ssh_ciphertab[] = {
+#ifdef WITH_BLOWFISH_CIPHER
{
.name = "blowfish-cbc",
.blocksize = 8,
@@ -892,6 +895,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = {
.decrypt = evp_cipher_decrypt,
.cleanup = evp_cipher_cleanup
},
+#endif
#ifdef HAS_AES
#ifndef BROKEN_AES_CTR
/* OpenSSL until 0.9.7c has a broken AES_ctr128_encrypt implementation which