View | Details | Raw Unified | Return to bug 2466 | Differences between
and this patch

Collapse All | Expand All

(-)openssh-7.1p1.old/cipher.c (-4 / +14 lines)
Lines 85-98 Link Here
85
#endif /* WITH_SSH1 */
85
#endif /* WITH_SSH1 */
86
#ifdef WITH_OPENSSL
86
#ifdef WITH_OPENSSL
87
	{ "none",	SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null },
87
	{ "none",	SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null },
88
# ifndef OPENSSL_NO_DES
88
	{ "3des-cbc",	SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc },
89
	{ "3des-cbc",	SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc },
90
# endif /* OPENSSL_NO_DES */
91
# ifndef OPENSSL_NO_BF
89
	{ "blowfish-cbc",
92
	{ "blowfish-cbc",
90
			SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc },
93
			SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc },
94
# endif /* OPENSSL_NO_BF */
95
# ifndef OPENSSL_NO_CAST
91
	{ "cast128-cbc",
96
	{ "cast128-cbc",
92
			SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_cast5_cbc },
97
			SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_cast5_cbc },
98
# endif /* OPENSSL_NO_CAST */
99
# ifndef OPENSSL_NO_RC4
93
	{ "arcfour",	SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 0, EVP_rc4 },
100
	{ "arcfour",	SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 0, EVP_rc4 },
94
	{ "arcfour128",	SSH_CIPHER_SSH2, 8, 16, 0, 0, 1536, 0, EVP_rc4 },
101
	{ "arcfour128",	SSH_CIPHER_SSH2, 8, 16, 0, 0, 1536, 0, EVP_rc4 },
95
	{ "arcfour256",	SSH_CIPHER_SSH2, 8, 32, 0, 0, 1536, 0, EVP_rc4 },
102
	{ "arcfour256",	SSH_CIPHER_SSH2, 8, 32, 0, 0, 1536, 0, EVP_rc4 },
103
# endif /* OPENSSL_NO_RC4 */
104
# ifndef OPENSSL_NO_AES
96
	{ "aes128-cbc",	SSH_CIPHER_SSH2, 16, 16, 0, 0, 0, 1, EVP_aes_128_cbc },
105
	{ "aes128-cbc",	SSH_CIPHER_SSH2, 16, 16, 0, 0, 0, 1, EVP_aes_128_cbc },
97
	{ "aes192-cbc",	SSH_CIPHER_SSH2, 16, 24, 0, 0, 0, 1, EVP_aes_192_cbc },
106
	{ "aes192-cbc",	SSH_CIPHER_SSH2, 16, 24, 0, 0, 0, 1, EVP_aes_192_cbc },
98
	{ "aes256-cbc",	SSH_CIPHER_SSH2, 16, 32, 0, 0, 0, 1, EVP_aes_256_cbc },
107
	{ "aes256-cbc",	SSH_CIPHER_SSH2, 16, 32, 0, 0, 0, 1, EVP_aes_256_cbc },
Lines 101-112 Link Here
101
	{ "aes128-ctr",	SSH_CIPHER_SSH2, 16, 16, 0, 0, 0, 0, EVP_aes_128_ctr },
110
	{ "aes128-ctr",	SSH_CIPHER_SSH2, 16, 16, 0, 0, 0, 0, EVP_aes_128_ctr },
102
	{ "aes192-ctr",	SSH_CIPHER_SSH2, 16, 24, 0, 0, 0, 0, EVP_aes_192_ctr },
111
	{ "aes192-ctr",	SSH_CIPHER_SSH2, 16, 24, 0, 0, 0, 0, EVP_aes_192_ctr },
103
	{ "aes256-ctr",	SSH_CIPHER_SSH2, 16, 32, 0, 0, 0, 0, EVP_aes_256_ctr },
112
	{ "aes256-ctr",	SSH_CIPHER_SSH2, 16, 32, 0, 0, 0, 0, EVP_aes_256_ctr },
104
# ifdef OPENSSL_HAVE_EVPGCM
113
#  ifdef OPENSSL_HAVE_EVPGCM
105
	{ "aes128-gcm@openssh.com",
114
	{ "aes128-gcm@openssh.com",
106
			SSH_CIPHER_SSH2, 16, 16, 12, 16, 0, 0, EVP_aes_128_gcm },
115
			SSH_CIPHER_SSH2, 16, 16, 12, 16, 0, 0, EVP_aes_128_gcm },
107
	{ "aes256-gcm@openssh.com",
116
	{ "aes256-gcm@openssh.com",
108
			SSH_CIPHER_SSH2, 16, 32, 12, 16, 0, 0, EVP_aes_256_gcm },
117
			SSH_CIPHER_SSH2, 16, 32, 12, 16, 0, 0, EVP_aes_256_gcm },
109
# endif /* OPENSSL_HAVE_EVPGCM */
118
#  endif /* OPENSSL_HAVE_EVPGCM */
119
# endif /* OPENSSL_NO_AES */
110
#else /* WITH_OPENSSL */
120
#else /* WITH_OPENSSL */
111
	{ "aes128-ctr",	SSH_CIPHER_SSH2, 16, 16, 0, 0, 0, CFLAG_AESCTR, NULL },
121
	{ "aes128-ctr",	SSH_CIPHER_SSH2, 16, 16, 0, 0, 0, CFLAG_AESCTR, NULL },
112
	{ "aes192-ctr",	SSH_CIPHER_SSH2, 16, 24, 0, 0, 0, CFLAG_AESCTR, NULL },
122
	{ "aes192-ctr",	SSH_CIPHER_SSH2, 16, 24, 0, 0, 0, CFLAG_AESCTR, NULL },
Lines 626-632 Link Here
626
int
636
int
627
cipher_get_keycontext(const struct sshcipher_ctx *cc, u_char *dat)
637
cipher_get_keycontext(const struct sshcipher_ctx *cc, u_char *dat)
628
{
638
{
629
#ifdef WITH_OPENSSL
639
#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_RC4)
630
	const struct sshcipher *c = cc->cipher;
640
	const struct sshcipher *c = cc->cipher;
631
	int plen = 0;
641
	int plen = 0;
632
642
Lines 645-651 Link Here
645
void
655
void
646
cipher_set_keycontext(struct sshcipher_ctx *cc, const u_char *dat)
656
cipher_set_keycontext(struct sshcipher_ctx *cc, const u_char *dat)
647
{
657
{
648
#ifdef WITH_OPENSSL
658
#if defined(WITH_OPENSSL) && !defined(OPENSSL_NO_RC4)
649
	const struct sshcipher *c = cc->cipher;
659
	const struct sshcipher *c = cc->cipher;
650
	int plen;
660
	int plen;
651
661

Return to bug 2466