aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
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 /meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
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>
Diffstat (limited to 'meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch')
-rw-r--r--meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch54
1 files changed, 54 insertions, 0 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 0000000000..209b0dd409
--- /dev/null
+++ b/meta-networking/recipes-support/stunnel/stunnel/fix-openssl-no-des.patch
@@ -0,0 +1,54 @@
+Upstream-Status: Pending
+
+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>
+---
+diff --git a/src/common.h b/src/common.h
+index f7d38b0..bf485af 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -471,7 +471,9 @@ extern char *sys_errlist[];
+ #ifndef OPENSSL_NO_MD4
+ #include <openssl/md4.h>
+ #endif /* !defined(OPENSSL_NO_MD4) */
++#ifndef OPENSSL_NO_DES
+ #include <openssl/des.h>
++#endif
+ #ifndef OPENSSL_NO_DH
+ #include <openssl/dh.h>
+ #if OPENSSL_VERSION_NUMBER<0x10100000L
+diff --git a/src/protocol.c b/src/protocol.c
+index 587df09..8198eb6 100644
+--- a/src/protocol.c
++++ b/src/protocol.c
+@@ -66,7 +66,7 @@ NOEXPORT char *imap_server(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *nntp_client(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *connect_server(CLI *, SERVICE_OPTIONS *, const PHASE);
+ NOEXPORT char *connect_client(CLI *, SERVICE_OPTIONS *, const PHASE);
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+ NOEXPORT void ntlm(CLI *, SERVICE_OPTIONS *);
+ NOEXPORT char *ntlm1();
+ NOEXPORT char *ntlm3(char *, char *, char *, char *);
+@@ -1175,7 +1175,7 @@ NOEXPORT char *connect_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) {
+ fd_printf(c, c->remote_fd.fd, "Host: %s", opt->protocol_host);
+ if(opt->protocol_username && opt->protocol_password) {
+ if(!strcasecmp(opt->protocol_authentication, "ntlm")) {
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+ ntlm(c, opt);
+ #else
+ s_log(LOG_ERR, "NTLM authentication is not available");
+@@ -1216,7 +1216,7 @@ NOEXPORT char *connect_client(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) {
+ return NULL;
+ }
+
+-#ifndef OPENSSL_NO_MD4
++#if !defined(OPENSSL_NO_MD4) && !defined(OPENSSL_NO_DES)
+
+ /*
+ * NTLM code is based on the following documentation: