diff options
Diffstat (limited to 'meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch')
-rw-r--r-- | meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch b/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch deleted file mode 100644 index 1098b972ce..0000000000 --- a/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | From 27740c918fe5d78441bcf69e7d2eefb23ddeca4c Mon Sep 17 00:00:00 2001 | ||
2 | From: Dengke Du <dengke.du@windriver.com> | ||
3 | Date: Thu, 19 Jan 2017 03:00:08 -0500 | ||
4 | Subject: [PATCH 1/3] Remove des in cipher. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> | ||
9 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
10 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
11 | --- | ||
12 | cipher.c | 18 ++++++++++++++++++ | ||
13 | 1 file changed, 18 insertions(+) | ||
14 | |||
15 | diff --git a/cipher.c b/cipher.c | ||
16 | index 2def333..59f6792 100644 | ||
17 | --- a/cipher.c | ||
18 | +++ b/cipher.c | ||
19 | @@ -53,8 +53,10 @@ | ||
20 | |||
21 | #ifdef WITH_SSH1 | ||
22 | extern const EVP_CIPHER *evp_ssh1_bf(void); | ||
23 | +#ifndef OPENSSL_NO_DES | ||
24 | extern const EVP_CIPHER *evp_ssh1_3des(void); | ||
25 | extern int ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int); | ||
26 | +#endif /* OPENSSL_NO_DES */ | ||
27 | #endif | ||
28 | |||
29 | struct sshcipher_ctx { | ||
30 | @@ -88,15 +90,19 @@ struct sshcipher { | ||
31 | |||
32 | static const struct sshcipher ciphers[] = { | ||
33 | #ifdef WITH_SSH1 | ||
34 | +#ifndef OPENSSL_NO_DES | ||
35 | { "des", SSH_CIPHER_DES, 8, 8, 0, 0, 0, 1, EVP_des_cbc }, | ||
36 | { "3des", SSH_CIPHER_3DES, 8, 16, 0, 0, 0, 1, evp_ssh1_3des }, | ||
37 | +#endif /* OPENSSL_NO_DES */ | ||
38 | # ifndef OPENSSL_NO_BF | ||
39 | { "blowfish", SSH_CIPHER_BLOWFISH, 8, 32, 0, 0, 0, 1, evp_ssh1_bf }, | ||
40 | # endif /* OPENSSL_NO_BF */ | ||
41 | #endif /* WITH_SSH1 */ | ||
42 | #ifdef WITH_OPENSSL | ||
43 | +#ifndef OPENSSL_NO_DES | ||
44 | { "none", SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null }, | ||
45 | { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc }, | ||
46 | +#endif /* OPENSSL_NO_DES */ | ||
47 | # ifndef OPENSSL_NO_BF | ||
48 | { "blowfish-cbc", | ||
49 | SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc }, | ||
50 | @@ -180,8 +186,10 @@ cipher_keylen(const struct sshcipher *c) | ||
51 | u_int | ||
52 | cipher_seclen(const struct sshcipher *c) | ||
53 | { | ||
54 | +#ifndef OPENSSL_NO_DES | ||
55 | if (strcmp("3des-cbc", c->name) == 0) | ||
56 | return 14; | ||
57 | +#endif /* OPENSSL_NO_DES */ | ||
58 | return cipher_keylen(c); | ||
59 | } | ||
60 | |||
61 | @@ -230,11 +238,13 @@ u_int | ||
62 | cipher_mask_ssh1(int client) | ||
63 | { | ||
64 | u_int mask = 0; | ||
65 | +#ifndef OPENSSL_NO_DES | ||
66 | mask |= 1 << SSH_CIPHER_3DES; /* Mandatory */ | ||
67 | mask |= 1 << SSH_CIPHER_BLOWFISH; | ||
68 | if (client) { | ||
69 | mask |= 1 << SSH_CIPHER_DES; | ||
70 | } | ||
71 | +#endif /*OPENSSL_NO_DES*/ | ||
72 | return mask; | ||
73 | } | ||
74 | |||
75 | @@ -606,7 +616,9 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len) | ||
76 | switch (c->number) { | ||
77 | #ifdef WITH_OPENSSL | ||
78 | case SSH_CIPHER_SSH2: | ||
79 | +#ifndef OPENSSL_NO_DES | ||
80 | case SSH_CIPHER_DES: | ||
81 | +#endif /* OPENSSL_NO_DES */ | ||
82 | case SSH_CIPHER_BLOWFISH: | ||
83 | evplen = EVP_CIPHER_CTX_iv_length(cc->evp); | ||
84 | if (evplen == 0) | ||
85 | @@ -629,8 +641,10 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len) | ||
86 | break; | ||
87 | #endif | ||
88 | #ifdef WITH_SSH1 | ||
89 | +#ifndef OPENSSL_NO_DES | ||
90 | case SSH_CIPHER_3DES: | ||
91 | return ssh1_3des_iv(cc->evp, 0, iv, 24); | ||
92 | +#endif /* OPENSSL_NO_DES */ | ||
93 | #endif | ||
94 | default: | ||
95 | return SSH_ERR_INVALID_ARGUMENT; | ||
96 | @@ -654,7 +668,9 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv) | ||
97 | switch (c->number) { | ||
98 | #ifdef WITH_OPENSSL | ||
99 | case SSH_CIPHER_SSH2: | ||
100 | +#ifndef OPENSSL_NO_DES | ||
101 | case SSH_CIPHER_DES: | ||
102 | +#endif /* OPENSSL_NO_DES */ | ||
103 | case SSH_CIPHER_BLOWFISH: | ||
104 | evplen = EVP_CIPHER_CTX_iv_length(cc->evp); | ||
105 | if (evplen <= 0) | ||
106 | @@ -675,8 +691,10 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv) | ||
107 | break; | ||
108 | #endif | ||
109 | #ifdef WITH_SSH1 | ||
110 | +#ifndef OPENSSL_NO_DES | ||
111 | case SSH_CIPHER_3DES: | ||
112 | return ssh1_3des_iv(cc->evp, 1, (u_char *)iv, 24); | ||
113 | +#endif /* OPENSSL_NO_DES */ | ||
114 | #endif | ||
115 | default: | ||
116 | return SSH_ERR_INVALID_ARGUMENT; | ||
117 | -- | ||
118 | 2.8.1 | ||
119 | |||