summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2017-11-01 09:23:41 -0400
committerArmin Kuster <akuster808@gmail.com>2018-02-01 07:32:05 -0800
commitfc88b638ec3f2c9fb4389f08069ed31f9a67eff7 (patch)
tree3bbe22af1d0c4cd9280b519127284acf758713bd
parente4c768c2e35f6242886c25f6d504d6ae5b9b2b50 (diff)
downloadmeta-openembedded-fc88b638ec3f2c9fb4389f08069ed31f9a67eff7.tar.gz
stunnel: fix compile error when openssl disable des support
When openssl disable des support with configure option 'no-des', it doesn't provide des related header file and functions. That causes stunnel compile failed. Fix it by checking macro OPENSSL_NO_DES to use openssl des related library conditionaly. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> (cherry picked from commit f9a1fe6ab2dfb6a53e58fc8da3a1580e76954e5e) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch54
-rw-r--r--meta-networking/recipes-support/stunnel/stunnel_5.35.bb4
2 files changed, 57 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch b/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
new file mode 100644
index 000000000..209b0dd40
--- /dev/null
+++ b/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
@@ -0,0 +1,54 @@
1Upstream-Status: Pending
2
3When openssl disable des support with configure option 'no-des', it doesn't
4provide des related header file and functions. That causes stunnel compile
5failed. Fix it by checking macro OPENSSL_NO_DES to use openssl des related
6library conditionaly.
7
8Signed-off-by: Kai Kang <kai.kang@windriver.com>
9---
10diff --git a/src/common.h b/src/common.h
11index f7d38b0..bf485af 100644
12--- a/src/common.h
13+++ b/src/common.h
14@@ -471,7 +471,9 @@ extern char *sys_errlist[];
15 #ifndef OPENSSL_NO_MD4
16 #include <openssl/md4.h>
17 #endif /* !defined(OPENSSL_NO_MD4) */
18+#ifndef OPENSSL_NO_DES
19 #include <openssl/des.h>
20+#endif
21 #ifndef OPENSSL_NO_DH
22 #include <openssl/dh.h>
23 #if OPENSSL_VERSION_NUMBER<0x10100000L
24diff --git a/src/protocol.c b/src/protocol.c
25index 587df09..8198eb6 100644
26--- a/src/protocol.c
27+++ b/src/protocol.c
28@@ -66,7 +66,7 @@ NOEXPORT char *imap_server(CLI *, SERVICE_OPTIONS *, const PHASE);
29 NOEXPORT char *nntp_client(CLI *, SERVICE_OPTIONS *, const PHASE);
30 NOEXPORT char *connect_server(CLI *, SERVICE_OPTIONS *, const PHASE);
31 NOEXPORT char *connect_client(CLI *, SERVICE_OPTIONS *, const PHASE);
32-#ifndef OPENSSL_NO_MD4
33+#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
34 NOEXPORT void ntlm(CLI *, SERVICE_OPTIONS *);
35 NOEXPORT char *ntlm1();
36 NOEXPORT char *ntlm3(char *, char *, char *, char *);
37@@ -1175,7 +1175,7 @@ NOEXPORT char *connect_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) {
38 fd_printf(c, c->remote_fd.fd, "Host: %s", opt->protocol_host);
39 if(opt->protocol_username && opt->protocol_password) {
40 if(!strcasecmp(opt->protocol_authentication, "ntlm")) {
41-#ifndef OPENSSL_NO_MD4
42+#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
43 ntlm(c, opt);
44 #else
45 s_log(LOG_ERR, "NTLM authentication is not available");
46@@ -1216,7 +1216,7 @@ NOEXPORT char *connect_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) {
47 return NULL;
48 }
49
50-#ifndef OPENSSL_NO_MD4
51+#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
52
53 /*
54 * NTLM code is based on the following documentation:
diff --git a/meta-networking/recipes-support/stunnel/stunnel_5.35.bb b/meta-networking/recipes-support/stunnel/stunnel_5.35.bb
index efe9d9e57..ec8478d6b 100644
--- a/meta-networking/recipes-support/stunnel/stunnel_5.35.bb
+++ b/meta-networking/recipes-support/stunnel/stunnel_5.35.bb
@@ -8,7 +8,9 @@ DEPENDS = "openssl zlib tcp-wrappers"
8 8
9RDEPENDS_${PN} += "perl" 9RDEPENDS_${PN} += "perl"
10 10
11SRC_URI = "ftp://ftp.stunnel.org/stunnel/archive/5.x/${BP}.tar.gz" 11SRC_URI = "ftp://ftp.stunnel.org/stunnel/archive/5.x/${BP}.tar.gz \
12 file://fix-openssl-no-des.patch \
13"
12 14
13SRC_URI[md5sum] = "9079f5fafbccaf88b7d92b227d78249a" 15SRC_URI[md5sum] = "9079f5fafbccaf88b7d92b227d78249a"
14SRC_URI[sha256sum] = "ffa386ae4c825f35f35157c285e7402a6d58779ad8c3822f74a9d355b54aba1d" 16SRC_URI[sha256sum] = "ffa386ae4c825f35f35157c285e7402a6d58779ad8c3822f74a9d355b54aba1d"