summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch
diff options
context:
space:
mode:
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.patch39
1 files changed, 20 insertions, 19 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
index 2773c14e5a..1098b972ce 100644
--- 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
@@ -1,18 +1,19 @@
1From d7eb26785ad4f25fb09fae46726ab8ca3fe16921 Mon Sep 17 00:00:00 2001 1From 27740c918fe5d78441bcf69e7d2eefb23ddeca4c Mon Sep 17 00:00:00 2001
2From: Haiqing Bai <Haiqing.Bai@windriver.com> 2From: Dengke Du <dengke.du@windriver.com>
3Date: Mon, 22 Aug 2016 14:11:16 +0300 3Date: Thu, 19 Jan 2017 03:00:08 -0500
4Subject: [PATCH] Remove des in cipher. 4Subject: [PATCH 1/3] Remove des in cipher.
5 5
6Upstream-Status: Pending 6Upstream-Status: Pending
7 7
8Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> 8Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
9Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 9Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
10Signed-off-by: Dengke Du <dengke.du@windriver.com>
10--- 11---
11 cipher.c | 18 ++++++++++++++++++ 12 cipher.c | 18 ++++++++++++++++++
12 1 file changed, 18 insertions(+) 13 1 file changed, 18 insertions(+)
13 14
14diff --git a/cipher.c b/cipher.c 15diff --git a/cipher.c b/cipher.c
15index 031bda9..6cd667a 100644 16index 2def333..59f6792 100644
16--- a/cipher.c 17--- a/cipher.c
17+++ b/cipher.c 18+++ b/cipher.c
18@@ -53,8 +53,10 @@ 19@@ -53,8 +53,10 @@
@@ -25,8 +26,8 @@ index 031bda9..6cd667a 100644
25+#endif /* OPENSSL_NO_DES */ 26+#endif /* OPENSSL_NO_DES */
26 #endif 27 #endif
27 28
28 struct sshcipher { 29 struct sshcipher_ctx {
29@@ -79,15 +81,19 @@ struct sshcipher { 30@@ -88,15 +90,19 @@ struct sshcipher {
30 31
31 static const struct sshcipher ciphers[] = { 32 static const struct sshcipher ciphers[] = {
32 #ifdef WITH_SSH1 33 #ifdef WITH_SSH1
@@ -39,14 +40,14 @@ index 031bda9..6cd667a 100644
39 # endif /* OPENSSL_NO_BF */ 40 # endif /* OPENSSL_NO_BF */
40 #endif /* WITH_SSH1 */ 41 #endif /* WITH_SSH1 */
41 #ifdef WITH_OPENSSL 42 #ifdef WITH_OPENSSL
42 { "none", SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null },
43+#ifndef OPENSSL_NO_DES 43+#ifndef OPENSSL_NO_DES
44 { "none", SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null },
44 { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc }, 45 { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc },
45+#endif /* OPENSSL_NO_DES */ 46+#endif /* OPENSSL_NO_DES */
46 # ifndef OPENSSL_NO_BF 47 # ifndef OPENSSL_NO_BF
47 { "blowfish-cbc", 48 { "blowfish-cbc",
48 SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc }, 49 SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc },
49@@ -171,8 +177,10 @@ cipher_keylen(const struct sshcipher *c) 50@@ -180,8 +186,10 @@ cipher_keylen(const struct sshcipher *c)
50 u_int 51 u_int
51 cipher_seclen(const struct sshcipher *c) 52 cipher_seclen(const struct sshcipher *c)
52 { 53 {
@@ -57,7 +58,7 @@ index 031bda9..6cd667a 100644
57 return cipher_keylen(c); 58 return cipher_keylen(c);
58 } 59 }
59 60
60@@ -209,11 +217,13 @@ u_int 61@@ -230,11 +238,13 @@ u_int
61 cipher_mask_ssh1(int client) 62 cipher_mask_ssh1(int client)
62 { 63 {
63 u_int mask = 0; 64 u_int mask = 0;
@@ -71,7 +72,7 @@ index 031bda9..6cd667a 100644
71 return mask; 72 return mask;
72 } 73 }
73 74
74@@ -553,7 +563,9 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len) 75@@ -606,7 +616,9 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
75 switch (c->number) { 76 switch (c->number) {
76 #ifdef WITH_OPENSSL 77 #ifdef WITH_OPENSSL
77 case SSH_CIPHER_SSH2: 78 case SSH_CIPHER_SSH2:
@@ -79,20 +80,20 @@ index 031bda9..6cd667a 100644
79 case SSH_CIPHER_DES: 80 case SSH_CIPHER_DES:
80+#endif /* OPENSSL_NO_DES */ 81+#endif /* OPENSSL_NO_DES */
81 case SSH_CIPHER_BLOWFISH: 82 case SSH_CIPHER_BLOWFISH:
82 evplen = EVP_CIPHER_CTX_iv_length(&cc->evp); 83 evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
83 if (evplen == 0) 84 if (evplen == 0)
84@@ -576,8 +588,10 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len) 85@@ -629,8 +641,10 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
85 break; 86 break;
86 #endif 87 #endif
87 #ifdef WITH_SSH1 88 #ifdef WITH_SSH1
88+#ifndef OPENSSL_NO_DES 89+#ifndef OPENSSL_NO_DES
89 case SSH_CIPHER_3DES: 90 case SSH_CIPHER_3DES:
90 return ssh1_3des_iv(&cc->evp, 0, iv, 24); 91 return ssh1_3des_iv(cc->evp, 0, iv, 24);
91+#endif /* OPENSSL_NO_DES */ 92+#endif /* OPENSSL_NO_DES */
92 #endif 93 #endif
93 default: 94 default:
94 return SSH_ERR_INVALID_ARGUMENT; 95 return SSH_ERR_INVALID_ARGUMENT;
95@@ -601,7 +615,9 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv) 96@@ -654,7 +668,9 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
96 switch (c->number) { 97 switch (c->number) {
97 #ifdef WITH_OPENSSL 98 #ifdef WITH_OPENSSL
98 case SSH_CIPHER_SSH2: 99 case SSH_CIPHER_SSH2:
@@ -100,19 +101,19 @@ index 031bda9..6cd667a 100644
100 case SSH_CIPHER_DES: 101 case SSH_CIPHER_DES:
101+#endif /* OPENSSL_NO_DES */ 102+#endif /* OPENSSL_NO_DES */
102 case SSH_CIPHER_BLOWFISH: 103 case SSH_CIPHER_BLOWFISH:
103 evplen = EVP_CIPHER_CTX_iv_length(&cc->evp); 104 evplen = EVP_CIPHER_CTX_iv_length(cc->evp);
104 if (evplen <= 0) 105 if (evplen <= 0)
105@@ -616,8 +632,10 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv) 106@@ -675,8 +691,10 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
106 break; 107 break;
107 #endif 108 #endif
108 #ifdef WITH_SSH1 109 #ifdef WITH_SSH1
109+#ifndef OPENSSL_NO_DES 110+#ifndef OPENSSL_NO_DES
110 case SSH_CIPHER_3DES: 111 case SSH_CIPHER_3DES:
111 return ssh1_3des_iv(&cc->evp, 1, (u_char *)iv, 24); 112 return ssh1_3des_iv(cc->evp, 1, (u_char *)iv, 24);
112+#endif /* OPENSSL_NO_DES */ 113+#endif /* OPENSSL_NO_DES */
113 #endif 114 #endif
114 default: 115 default:
115 return SSH_ERR_INVALID_ARGUMENT; 116 return SSH_ERR_INVALID_ARGUMENT;
116-- 117--
1172.1.4 1182.8.1
118 119