diff options
Diffstat (limited to 'cipher.c')
-rw-r--r-- | cipher.c | 22 |
1 files changed, 1 insertions, 21 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cipher.c,v 1.102 2016/08/03 05:41:57 djm Exp $ */ | 1 | /* $OpenBSD: cipher.c,v 1.103 2017/04/30 23:10:43 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -51,11 +51,6 @@ | |||
51 | 51 | ||
52 | #include "openbsd-compat/openssl-compat.h" | 52 | #include "openbsd-compat/openssl-compat.h" |
53 | 53 | ||
54 | #ifdef WITH_SSH1 | ||
55 | extern const EVP_CIPHER *evp_ssh1_bf(void); | ||
56 | extern const EVP_CIPHER *evp_ssh1_3des(void); | ||
57 | extern int ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int); | ||
58 | #endif | ||
59 | 54 | ||
60 | struct sshcipher_ctx { | 55 | struct sshcipher_ctx { |
61 | int plaintext; | 56 | int plaintext; |
@@ -87,13 +82,6 @@ struct sshcipher { | |||
87 | }; | 82 | }; |
88 | 83 | ||
89 | static const struct sshcipher ciphers[] = { | 84 | static const struct sshcipher ciphers[] = { |
90 | #ifdef WITH_SSH1 | ||
91 | { "des", SSH_CIPHER_DES, 8, 8, 0, 0, 0, 1, EVP_des_cbc }, | ||
92 | { "3des", SSH_CIPHER_3DES, 8, 16, 0, 0, 0, 1, evp_ssh1_3des }, | ||
93 | # ifndef OPENSSL_NO_BF | ||
94 | { "blowfish", SSH_CIPHER_BLOWFISH, 8, 32, 0, 0, 0, 1, evp_ssh1_bf }, | ||
95 | # endif /* OPENSSL_NO_BF */ | ||
96 | #endif /* WITH_SSH1 */ | ||
97 | #ifdef WITH_OPENSSL | 85 | #ifdef WITH_OPENSSL |
98 | { "none", SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null }, | 86 | { "none", SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null }, |
99 | { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc }, | 87 | { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc }, |
@@ -628,10 +616,6 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len) | |||
628 | memcpy(iv, cc->evp->iv, len); | 616 | memcpy(iv, cc->evp->iv, len); |
629 | break; | 617 | break; |
630 | #endif | 618 | #endif |
631 | #ifdef WITH_SSH1 | ||
632 | case SSH_CIPHER_3DES: | ||
633 | return ssh1_3des_iv(cc->evp, 0, iv, 24); | ||
634 | #endif | ||
635 | default: | 619 | default: |
636 | return SSH_ERR_INVALID_ARGUMENT; | 620 | return SSH_ERR_INVALID_ARGUMENT; |
637 | } | 621 | } |
@@ -674,10 +658,6 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv) | |||
674 | memcpy(cc->evp->iv, iv, evplen); | 658 | memcpy(cc->evp->iv, iv, evplen); |
675 | break; | 659 | break; |
676 | #endif | 660 | #endif |
677 | #ifdef WITH_SSH1 | ||
678 | case SSH_CIPHER_3DES: | ||
679 | return ssh1_3des_iv(cc->evp, 1, (u_char *)iv, 24); | ||
680 | #endif | ||
681 | default: | 661 | default: |
682 | return SSH_ERR_INVALID_ARGUMENT; | 662 | return SSH_ERR_INVALID_ARGUMENT; |
683 | } | 663 | } |