package/libshout: Add support for openssl 1.1.x
PATCH v7 1/8 package/libshout: Add support for openssl 1.1.x
From: Vadim Kochan <[email protected]>
Added patch from Debian:
---
Changes v7:
- Restore original link to original patch in commit msg
Changes v6:
- Added Signed-off-by to the patch
--- ...shout-tls-compile-with-OpenSSL-1.1.0.patch | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 package/libshout/0003-libshout-tls-compile-with-OpenSSL-1.1.0.patch
package/libshout/0003-libshout-tls-compile-with-OpenSSL-1.1.0.patch new file +59 -0
@@ -0,0 +1,59 @@ +From 01fafc449f0de56743d08e7976933c49e2915bfa Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior <[email protected]> +Date: Wed, 15 Nov 2017 12:46:25 +0000 +Subject: [PATCH] tls: compile with OpenSSL 1.1.0 + +The init functions are not longer required in OpenSSL 1.1 so I dropped +them. + +TLSv1_client_method() should not be used because it enables only the +TLSv1.0 protocol. Better is to use SSLv23_client_method() which enable +all the protocols including TLSv1.2. With this functions SSLv2 and SSLv3 +is theoretically possible but as of today those protocols are usually +build-time disabled. +To avoid all this OpenSSL 1.1 provides TLS_client_method() which is aim +to provide to highest TLS protocol version (same as +SSLv23_client_method() but it is deprecated in 1.1). + +Signed-off-by: Sebastian Andrzej Siewior <[email protected]> +Signed-off-by: Patrick Havelange <[email protected]> +--- + src/tls.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/tls.c b/src/tls.c +index 4562c7327077..e0e5c1a5f079 100644 +--- a/src/tls.c ++++ b/src/tls.c +@@ -24,6 +24,7 @@ + #endif + + #include <shout/shout.h> ++#include <string.h> + #include "shout_private.h" + + #ifndef XXX_HAVE_X509_check_host +@@ -61,14 +62,17 @@ shout_tls_t *shout_tls_new(shout_t *self, sock_t socket) + + static inline int tls_setup(shout_tls_t *tls) + { +- SSL_METHOD *meth; +- ++ const SSL_METHOD *meth; ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + SSL_library_init(); + SSL_load_error_strings(); + SSLeay_add_all_algorithms(); +- SSLeay_add_ssl_algorithms(); ++ SSLeay_add_ssl_algorithms(); + +- meth = TLSv1_client_method(); ++ meth = SSLv23_client_method(); ++#else ++ meth = TLS_client_method(); ++#endif + if (!meth) + goto error; + +-- +2.15.0
Signature · 1 line
2.17.1
PATCH v7 2/8 package/nut: Add support for openssl 1.1.x
From: Vadim Kochan <[email protected]>
---
Changes v7:
- add check for libressl
- remove patch number from title
Changes v6:
- use the actual upstream patch
- drop unrelated patch
--- ...Add-compatibility-with-openssl-1.1.0.patch | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 package/nut/0003-Add-compatibility-with-openssl-1.1.0.patch
package/nut/0003-Add-compatibility-with-openssl-1.1.0.patch new file +76 -0
@@ -0,0 +1,76 @@ +From fcbf18c92918ce5e81d0aab62a7aed5c2245ea4d Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz <[email protected]> +Date: Fri, 1 Jun 2018 11:17:28 -0300 +Subject: [PATCH] Add compatibility with openssl 1.1.0 + +Minor adjustments were needed: +* Openssl 1.1 libs do not need to be initialized. +* TLSv*_method became TLS_*_method. + +Signed-off-by: Eneas U de Queiroz <[email protected]> +Upstream: https://github.com/networkupstools/nut/pull/558/ +[added check for libressl] +Signed-off-by: Patrick Havelange <[email protected]> +--- + clients/upsclient.c | 5 ++++- + m4/nut_check_libopenssl.m4 | 2 +- + server/netssl.c | 7 +++++-- + 3 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/clients/upsclient.c b/clients/upsclient.c +index b90587b0..053d60fb 100644 +--- a/clients/upsclient.c ++++ b/clients/upsclient.c +@@ -316,10 +316,13 @@ int upscli_init(int certverify, const char *certpath, + + #ifdef WITH_OPENSSLdefined(LIBRESSL_VERSION_NUMBER) + ++# if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + SSL_library_init(); + SSL_load_error_strings(); ++# define TLS_client_method TLSv1_client_method ++# endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ + +- ssl_method = TLSv1_client_method(); ++ ssl_method = TLS_client_method(); + + if (!ssl_method) { + return 0; +diff --git a/m4/nut_check_libopenssl.m4 b/m4/nut_check_libopenssl.m4 +index 1b875077..7eb401cd 100644 +--- a/m4/nut_check_libopenssl.m4 ++++ b/m4/nut_check_libopenssl.m4 +@@ -58,7 +58,7 @@ if test -z "${nut_have_libopenssl_seen}"; then + + dnl check if openssl is usable + AC_CHECK_HEADERS(openssl/ssl.h, [nut_have_openssl=yes], [nut_have_openssl=no], [AC_INCLUDES_DEFAULT]) +- AC_CHECK_FUNCS(SSL_library_init, [], [nut_have_openssl=no]) ++ AC_CHECK_FUNCS(SSL_CTX_new, [], [nut_have_openssl=no]) + + if test "${nut_have_openssl}" = "yes"; then + nut_with_ssl="yes" +diff --git a/server/netssl.c b/server/netssl.c +index c2f40989..0289e296 100644 +--- a/server/netssl.c ++++ b/server/netssl.c +@@ -387,12 +387,15 @@ void ssl_init(void) + + #ifdef WITH_OPENSSL + ++# if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + SSL_load_error_strings(); + SSL_library_init(); ++# define TLS_server_method TLSv1_server_method ++# endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ + +- if ((ssl_method = TLSv1_server_method()) == NULL) { ++ if ((ssl_method = TLS_server_method()) == NULL) { + ssl_debug(); +- fatalx(EXIT_FAILURE, "TLSv1_server_method failed"); ++ fatalx(EXIT_FAILURE, "TLS_server_method failed"); + } + + if ((ssl_ctx = SSL_CTX_new(ssl_method)) == NULL) { +-- +2.16.1 +
Signature · 1 line
2.17.1
PATCH v7 2/8 package/nut: Add support for openssl 1.1.x
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
From: Vadim Kochan <[email protected]>
Signed-off-by Vadim Kochan <[email protected]>Signed-off-by Patrick Havelange <[email protected]>
Quoted 8 lines
---
Changes v7:
- add check for libressl
- remove patch number from titleChanges v6:
- use the actual upstream patch
- drop unrelated patch
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v7 3/8 package/pound: Fix build with OpenSSL 1.1.x
In reply to Patrick HavelangeFrom: Bernd Kuhls <[email protected]>
---
Changes v7:
- none
Changes v6:
- none
--- package/pound/0002-fix-openssl-1.1.0.patch | 331 +++++++++++++++++++++ 1 file changed, 331 insertions(+) create mode 100644 package/pound/0002-fix-openssl-1.1.0.patch
package/pound/0002-fix-openssl-1.1.0.patch new file +331 -0
@@ -0,0 +1,331 @@ +From a2c9dde4d055ea8942afb150b7fc3a807d4e5d60 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff <[email protected]> +Date: Wed, 28 Feb 2018 13:44:01 +0000 +Subject: [PATCH] Support for Openssl 1.1 + +Downloaded from github fork: +https://github.com/graygnuorg/pound/commit/a2c9dde4d055ea8942afb150b7fc3a807d4e5d60 + +This patch was announced on the upstream mailinglist: +http://www.apsis.ch/pound/pound_list/archive/2018/2018-03/1519920322000 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + .gitignore | 15 ++++++++ + config.c | 17 +++++++-- + http.c | 12 ++++++- + pound.h | 4 ++- + svc.c | 101 +++++++++++++++++++++++++++++++++++++++++++---------- + 5 files changed, 125 insertions(+), 24 deletions(-) + create mode 100644 .gitignore + +diff --git a/config.c b/config.c +index d41a3ee..e8fec0f 100644 +--- a/config.c ++++ b/config.c +@@ -174,6 +174,16 @@ conf_fgets(char *buf, const int max) + } + } + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++# define general_name_string(n) \ ++ strndup(ASN1_STRING_get0_data(n->d.dNSName), \ ++ ASN1_STRING_length(n->d.dNSName) + 1) ++#else ++# define general_name_string(n) \ ++ strndup(ASN1_STRING_data(n->d.dNSName), \ ++ ASN1_STRING_length(n->d.dNSName) + 1) ++#endif ++ + unsigned char ** + get_subjectaltnames(X509 *x509, unsigned int *count) + { +@@ -194,8 +204,7 @@ get_subjectaltnames(X509 *x509, unsigned int *count) + name = sk_GENERAL_NAME_pop(san_stack); + switch(name->type) { + case GEN_DNS: +- temp[local_count] = strndup(ASN1_STRING_data(name->d.dNSName), ASN1_STRING_length(name->d.dNSName) +- + 1); ++ temp[local_count] = general_name_string(name); + if(temp[local_count] == NULL) + conf_err("out of memory"); + local_count++; +@@ -565,7 +574,9 @@ parse_service(const char *svc_name) + pthread_mutex_init(&res->mut, NULL); + if(svc_name) + strncpy(res->name, svc_name, KEY_SIZE); +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((res->sessions = lh_TABNODE_new(t_hash, t_cmp)) == NULL) ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((res->sessions = LHM_lh_new(TABNODE, t)) == NULL) + #else + if((res->sessions = lh_new(LHASH_HASH_FN(t_hash), LHASH_COMP_FN(t_cmp))) == NULL) +diff --git a/http.c b/http.c +index dd211e4..c8e756a 100644 +--- a/http.c ++++ b/http.c +@@ -527,12 +527,22 @@ log_bytes(char *res, const LONG cnt) + + /* Cleanup code. This should really be in the pthread_cleanup_push, except for bugs in some implementations */ + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++# define clear_error() ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L ++# define clear_error() \ ++ if(ssl != NULL) { ERR_clear_error(); ERR_remove_thread_state(NULL); } ++#else ++# define clear_error() \ ++ if(ssl != NULL) { ERR_clear_error(); ERR_remove_state(0); } ++#endif ++ + #define clean_all() { \ + if(ssl != NULL) { BIO_ssl_shutdown(cl); } \ + if(be != NULL) { BIO_flush(be); BIO_reset(be); BIO_free_all(be); be = NULL; } \ + if(cl != NULL) { BIO_flush(cl); BIO_reset(cl); BIO_free_all(cl); cl = NULL; } \ + if(x509 != NULL) { X509_free(x509); x509 = NULL; } \ +- if(ssl != NULL) { ERR_clear_error(); ERR_remove_state(0); } \ ++ clear_error(); \ + } + + /* +diff --git a/pound.h b/pound.h +index fa22c36..9603b91 100644 +--- a/pound.h ++++ b/pound.h +@@ -344,7 +344,9 @@ typedef struct _tn { + /* maximal session key size */ + #define KEY_SIZE 127 + +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ DEFINE_LHASH_OF(TABNODE); ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + DECLARE_LHASH_OF(TABNODE); + #endif + +diff --git a/svc.c b/svc.c +index 60ba488..063b92c 100644 +--- a/svc.c ++++ b/svc.c +@@ -27,10 +27,17 @@ + + #include "pound.h" + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++# define TABNODE_GET_DOWN_LOAD(t) lh_TABNODE_get_down_load(t) ++# define TABNODE_SET_DOWN_LOAD(t,n) lh_TABNODE_set_down_load(t,n) ++#else + #ifndef LHASH_OF + #define LHASH_OF(x) LHASH + #define CHECKED_LHASH_OF(type, h) h + #endif ++# define TABNODE_GET_DOWN_LOAD(t) (CHECKED_LHASH_OF(TABNODE, t)->down_load) ++# define TABNODE_SET_DOWN_LOAD(t,n) (CHECKED_LHASH_OF(TABNODE, t)->down_load = n) ++#endif + + /* + * Add a new key/content pair to a hash table +@@ -58,7 +65,9 @@ t_add(LHASH_OF(TABNODE) *const tab, const char *key, const void *content, const + } + memcpy(t->content, content, cont_len); + t->last_acc = time(NULL); +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((old = lh_TABNODE_insert(tab, t)) != NULL) { ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((old = LHM_lh_insert(TABNODE, tab, t)) != NULL) { + #else + if((old = (TABNODE *)lh_insert(tab, t)) != NULL) { +@@ -82,7 +91,9 @@ t_find(LHASH_OF(TABNODE) *const tab, char *const key) + TABNODE t, *res; + + t.key = key; +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((res = lh_TABNODE_retrieve(tab, &t)) != NULL) { ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((res = (TABNODE *)LHM_lh_retrieve(TABNODE, tab, &t)) != NULL) { + #else + if((res = (TABNODE *)lh_retrieve(tab, &t)) != NULL) { +@@ -102,7 +113,9 @@ t_remove(LHASH_OF(TABNODE) *const tab, char *const key) + TABNODE t, *res; + + t.key = key; +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((res = lh_TABNODE_delete(tab, &t)) != NULL) { ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((res = LHM_lh_delete(TABNODE, tab, &t)) != NULL) { + #else + if((res = (TABNODE *)lh_delete(tab, &t)) != NULL) { +@@ -127,7 +140,9 @@ t_old_doall_arg(TABNODE *t, ALL_ARG *a) + TABNODE *res; + + if(t->last_acc < a->lim) +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((res = lh_TABNODE_delete(a->tab, t)) != NULL) { ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((res = LHM_lh_delete(TABNODE, a->tab, t)) != NULL) { + #else + if((res = lh_delete(a->tab, t)) != NULL) { +@@ -145,6 +160,10 @@ IMPLEMENT_LHASH_DOALL_ARG_FN(t_old, TABNODE, ALL_ARG) + IMPLEMENT_LHASH_DOALL_ARG_FN(t_old, TABNODE *, ALL_ARG *) + #endif + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++IMPLEMENT_LHASH_DOALL_ARG(TABNODE,ALL_ARG); ++#endif ++ + /* + * Expire all old nodes + */ +@@ -156,14 +175,16 @@ t_expire(LHASH_OF(TABNODE) *const tab, const time_t lim) + + a.tab = tab; + a.lim = lim; +- down_load = CHECKED_LHASH_OF(TABNODE, tab)->down_load; +- CHECKED_LHASH_OF(TABNODE, tab)->down_load = 0; +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++ down_load = TABNODE_GET_DOWN_LOAD(tab); ++ TABNODE_SET_DOWN_LOAD(tab, 0); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ lh_TABNODE_doall_ALL_ARG(tab, t_old_doall_arg, &a); ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + LHM_lh_doall_arg(TABNODE, tab, LHASH_DOALL_ARG_FN(t_old), ALL_ARG, &a); + #else + lh_doall_arg(tab, LHASH_DOALL_ARG_FN(t_old), &a); + #endif +- CHECKED_LHASH_OF(TABNODE, tab)->down_load = down_load; ++ TABNODE_SET_DOWN_LOAD(tab, down_load); + return; + } + +@@ -173,7 +194,9 @@ t_cont_doall_arg(TABNODE *t, ALL_ARG *arg) + TABNODE *res; + + if(memcmp(t->content, arg->content, arg->cont_len) == 0) +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((res = lh_TABNODE_delete(arg->tab, t)) != NULL) { ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((res = LHM_lh_delete(TABNODE, arg->tab, t)) != NULL) { + #else + if((res = lh_delete(arg->tab, t)) != NULL) { +@@ -203,15 +226,16 @@ t_clean(LHASH_OF(TABNODE) *const tab, void *const content, const size_t cont_len + a.tab = tab; + a.content = content; + a.cont_len = cont_len; +- down_load = CHECKED_LHASH_OF(TABNODE, tab)->down_load; +- CHECKED_LHASH_OF(TABNODE, tab)->down_load = 0; +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++ down_load = TABNODE_GET_DOWN_LOAD(tab); ++ TABNODE_SET_DOWN_LOAD(tab, 0); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ lh_TABNODE_doall_ALL_ARG(tab, t_cont_doall_arg, &a); ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + LHM_lh_doall_arg(TABNODE, tab, LHASH_DOALL_ARG_FN(t_cont), ALL_ARG, &a); + #else + lh_doall_arg(tab, LHASH_DOALL_ARG_FN(t_cont), &a); + #endif +- CHECKED_LHASH_OF(TABNODE, tab)->down_load = down_load; +- return; ++ TABNODE_SET_DOWN_LOAD(tab, down_load); + } + + /* +@@ -1262,6 +1286,31 @@ RSA_tmp_callback(/* not used */SSL *ssl, /* not used */int is_export, int keylen + return res; + } + ++static int ++generate_key(RSA **ret_rsa, unsigned long bits) ++{ ++#if OPENSSL_VERSION_NUMBER > 0x00908000L ++ int rc = 0; ++ RSA *rsa; ++ ++ rsa = RSA_new(); ++ if (rsa) { ++ BIGNUM *bne = BN_new(); ++ if (BN_set_word(bne, RSA_F4)) ++ rc = RSA_generate_key_ex(rsa, bits, bne, NULL); ++ BN_free(bne); ++ if (rc) ++ *ret_rsa = rsa; ++ else ++ RSA_free(rsa); ++ } ++ return rc; ++#else ++ *ret_rsa = RSA_generate_key(bits, RSA_F4, NULL, NULL); ++ return *ret_rsa != NULL; ++#endif ++} ++ + /* + * Periodically regenerate ephemeral RSA keys + * runs every T_RSA_KEYS seconds +@@ -1274,8 +1323,9 @@ do_RSAgen(void) + RSA *t_RSA1024_keys[N_RSA_KEYS]; + + for(n = 0; n < N_RSA_KEYS; n++) { +- t_RSA512_keys[n] = RSA_generate_key(512, RSA_F4, NULL, NULL); +- t_RSA1024_keys[n] = RSA_generate_key(1024, RSA_F4, NULL, NULL); ++ /* FIXME: Error handling */ ++ generate_key(&t_RSA512_keys[n], 512); ++ generate_key(&t_RSA1024_keys[n], 1024); + } + if(ret_val = pthread_mutex_lock(&RSA_mut)) + logmsg(LOG_WARNING, "thr_RSAgen() lock: %s", strerror(ret_val)); +@@ -1329,11 +1379,11 @@ init_timer(void) + * Pre-generate ephemeral RSA keys + */ + for(n = 0; n < N_RSA_KEYS; n++) { +- if((RSA512_keys[n] = RSA_generate_key(512, RSA_F4, NULL, NULL)) == NULL) { ++ if(!generate_key(&RSA512_keys[n], 512)) { + logmsg(LOG_WARNING,"RSA_generate(%d, 512) failed", n); + return; + } +- if((RSA1024_keys[n] = RSA_generate_key(1024, RSA_F4, NULL, NULL)) == NULL) { ++ if(!generate_key(&RSA1024_keys[n], 1024)) { + logmsg(LOG_WARNING,"RSA_generate(%d, 1024) failed", n); + return; + } +@@ -1420,6 +1470,10 @@ IMPLEMENT_LHASH_DOALL_ARG_FN(t_dump, TABNODE, DUMP_ARG) + IMPLEMENT_LHASH_DOALL_ARG_FN(t_dump, TABNODE *, DUMP_ARG *) + #endif + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++IMPLEMENT_LHASH_DOALL_ARG(TABNODE,DUMP_ARG); ++#endif ++ + /* + * write sessions to the control socket + */ +@@ -1430,7 +1484,9 @@ dump_sess(const int control_sock, LHASH_OF(TABNODE) *const sess, BACKEND *const + + a.control_sock = control_sock; + a.backends = backends; +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ lh_TABNODE_doall_DUMP_ARG(sess, t_dump_doall_arg, &a); ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + LHM_lh_doall_arg(TABNODE, sess, LHASH_DOALL_ARG_FN(t_dump), DUMP_ARG, &a); + #else + lh_doall_arg(sess, LHASH_DOALL_ARG_FN(t_dump), &a); +@@ -1664,6 +1720,13 @@ thr_control(void *arg) + } + } + ++#ifndef SSL3_ST_SR_CLNT_HELLO_A ++# define SSL3_ST_SR_CLNT_HELLO_A (0x110|SSL_ST_ACCEPT) ++#endif ++#ifndef SSL23_ST_SR_CLNT_HELLO_A ++# define SSL23_ST_SR_CLNT_HELLO_A (0x210|SSL_ST_ACCEPT) ++#endif ++ + void + SSLINFO_callback(const SSL *ssl, int where, int rc) + {
Signature · 1 line
2.17.1
PATCH v7 3/8 package/pound: Fix build with OpenSSL 1.1.x
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
From: Bernd Kuhls <[email protected]>
Signed-off-by Bernd Kuhls <[email protected]>Signed-off-by Patrick Havelange <[email protected]>
Quoted 6 lines
---
Changes v7:
- noneChanges v6:
- none
This looks to break building against libressl:
/home/peko/source/buildroot/output-pound/host/bin/arm-none-linux-gnueabi-gcc -DF_CONF=\"/etc/pound.cfg\" -DVERSION=\"2.8\" -DC_SSL=\"\" -DC_T_RSA=\"0\" -DC_DH_LEN=\"2048\" -DC_MAXBUF=\"0\" -DC_OWNER=\"peko\" -DC_GROUP=\"peko\" -DC_SUPER=\"0\" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pthread -DUPER -DNEED_STACK -DHAVE_SYSLOG_H=1 -pthread -DDH_LEN=2048 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -c -o svc.o svc.c
In file included from poundctl.c:28:0:
pound.h:348:3: warning: data definition has no type or storage class [enabled by default]
DEFINE_LHASH_OF(TABNODE);
^
In file included from http.c:28:0:
pound.h:348:3: warning: data definition has no type or storage class [enabled by default]
DEFINE_LHASH_OF(TABNODE);
^
In file included from pound.c:28:0:
pound.h:348:3: warning: data definition has no type or storage class [enabled by default]
DEFINE_LHASH_OF(TABNODE);
^
In file included from config.c:32:0:
pound.h:348:3: warning: data definition has no type or storage class [enabled by default]
DEFINE_LHASH_OF(TABNODE);
^config.c: In function 't_hash':
Signature · 1 line
Bye, Peter Korsgaard
PATCH v7 3/8 package/pound: Fix build with OpenSSL 1.1.x
Quoted 1 line · Peter Korsgaard
This looks to break building against libressl:
Indeed, looks like it needs libressl exceptions as well.
Regards,
Arnout
PATCH v7 3/8 package/pound: Fix build with OpenSSL 1.1.x
In reply to Patrick HavelangePatrick H,
Quoted 6 lines · Patrick Havelange
From: Bernd Kuhls <[email protected]>
Signed-off-by Bernd Kuhls <[email protected]>Signed-off-by Patrick Havelange <[email protected]>
Does this resolve:
http://autobuild.buildroot.net/results/613/61336369ebe69a57098edabdf94a47f776a0440f/build-end.log
?
Quoted 355 lines
---
Changes v7:
- noneChanges v6:
- none--- package/pound/0002-fix-openssl-1.1.0.patch | 331 +++++++++++++++++++++ 1 file changed, 331 insertions(+) create mode 100644 package/pound/0002-fix-openssl-1.1.0.patchpackage/pound/0002-fix-openssl-1.1.0.patch new file +331
-1@@ -0,0 +1,331 @@ +From a2c9dde4d055ea8942afb150b7fc3a807d4e5d60 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff <[email protected]> +Date: Wed, 28 Feb 2018 13:44:01 +0000 +Subject: [PATCH] Support for Openssl 1.1 + +Downloaded from github fork: +https://github.com/graygnuorg/pound/commit/a2c9dde4d055ea8942afb150b7fc3a807d4e5d60 + +This patch was announced on the upstream mailinglist: +http://www.apsis.ch/pound/pound_list/archive/2018/2018-03/1519920322000 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + .gitignore | 15 ++++++++ + config.c | 17 +++++++-- + http.c | 12 ++++++- + pound.h | 4 ++- + svc.c | 101 +++++++++++++++++++++++++++++++++++++++++++---------- + 5 files changed, 125 insertions(+), 24 deletions(-) + create mode 100644 .gitignore + +diff --git a/config.c b/config.c +index d41a3ee..e8fec0f 100644 +--- a/config.c ++++ b/config.c +@@ -174,6 +174,16 @@ conf_fgets(char *buf, const int max) + } + } + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++# define general_name_string(n) \ ++ strndup(ASN1_STRING_get0_data(n->d.dNSName), \ ++ ASN1_STRING_length(n->d.dNSName) + 1) ++#else ++# define general_name_string(n) \ ++ strndup(ASN1_STRING_data(n->d.dNSName), \ ++ ASN1_STRING_length(n->d.dNSName) + 1) ++#endif ++ + unsigned char ** + get_subjectaltnames(X509 *x509, unsigned int *count) + { +@@ -194,8 +204,7 @@ get_subjectaltnames(X509 *x509, unsigned int *count) + name = sk_GENERAL_NAME_pop(san_stack); + switch(name->type) { + case GEN_DNS: +- temp[local_count] = strndup(ASN1_STRING_data(name->d.dNSName), ASN1_STRING_length(name->d.dNSName) +- + 1); ++ temp[local_count] = general_name_string(name); + if(temp[local_count] == NULL) + conf_err("out of memory"); + local_count++; +@@ -565,7 +574,9 @@ parse_service(const char *svc_name) + pthread_mutex_init(&res->mut, NULL); + if(svc_name) + strncpy(res->name, svc_name, KEY_SIZE); +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((res->sessions = lh_TABNODE_new(t_hash, t_cmp)) == NULL) ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((res->sessions = LHM_lh_new(TABNODE, t)) == NULL) + #else + if((res->sessions = lh_new(LHASH_HASH_FN(t_hash), LHASH_COMP_FN(t_cmp))) == NULL) +diff --git a/http.c b/http.c +index dd211e4..c8e756a 100644 +--- a/http.c ++++ b/http.c +@@ -527,12 +527,22 @@ log_bytes(char *res, const LONG cnt) + + /* Cleanup code. This should really be in the pthread_cleanup_push, except for bugs in some implementations */ + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++# define clear_error() ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L ++# define clear_error() \ ++ if(ssl != NULL) { ERR_clear_error(); ERR_remove_thread_state(NULL); } ++#else ++# define clear_error() \ ++ if(ssl != NULL) { ERR_clear_error(); ERR_remove_state(0); } ++#endif ++ + #define clean_all() { \ + if(ssl != NULL) { BIO_ssl_shutdown(cl); } \ + if(be != NULL) { BIO_flush(be); BIO_reset(be); BIO_free_all(be); be = NULL; } \ + if(cl != NULL) { BIO_flush(cl); BIO_reset(cl); BIO_free_all(cl); cl = NULL; } \ + if(x509 != NULL) { X509_free(x509); x509 = NULL; } \ +- if(ssl != NULL) { ERR_clear_error(); ERR_remove_state(0); } \ ++ clear_error(); \ + } + + /* +diff --git a/pound.h b/pound.h +index fa22c36..9603b91 100644 +--- a/pound.h ++++ b/pound.h +@@ -344,7 +344,9 @@ typedef struct _tn { + /* maximal session key size */ + #define KEY_SIZE 127 + +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ DEFINE_LHASH_OF(TABNODE); ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + DECLARE_LHASH_OF(TABNODE); + #endif + +diff --git a/svc.c b/svc.c +index 60ba488..063b92c 100644 +--- a/svc.c ++++ b/svc.c +@@ -27,10 +27,17 @@ + + #include "pound.h" + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++# define TABNODE_GET_DOWN_LOAD(t) lh_TABNODE_get_down_load(t) ++# define TABNODE_SET_DOWN_LOAD(t,n) lh_TABNODE_set_down_load(t,n) ++#else + #ifndef LHASH_OF + #define LHASH_OF(x) LHASH + #define CHECKED_LHASH_OF(type, h) h + #endif ++# define TABNODE_GET_DOWN_LOAD(t) (CHECKED_LHASH_OF(TABNODE, t)->down_load) ++# define TABNODE_SET_DOWN_LOAD(t,n) (CHECKED_LHASH_OF(TABNODE, t)->down_load = n) ++#endif + + /* + * Add a new key/content pair to a hash table +@@ -58,7 +65,9 @@ t_add(LHASH_OF(TABNODE) *const tab, const char *key, const void *content, const + } + memcpy(t->content, content, cont_len); + t->last_acc = time(NULL); +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((old = lh_TABNODE_insert(tab, t)) != NULL) { ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((old = LHM_lh_insert(TABNODE, tab, t)) != NULL) { + #else + if((old = (TABNODE *)lh_insert(tab, t)) != NULL) { +@@ -82,7 +91,9 @@ t_find(LHASH_OF(TABNODE) *const tab, char *const key) + TABNODE t, *res; + + t.key = key; +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((res = lh_TABNODE_retrieve(tab, &t)) != NULL) { ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((res = (TABNODE *)LHM_lh_retrieve(TABNODE, tab, &t)) != NULL) { + #else + if((res = (TABNODE *)lh_retrieve(tab, &t)) != NULL) { +@@ -102,7 +113,9 @@ t_remove(LHASH_OF(TABNODE) *const tab, char *const key) + TABNODE t, *res; + + t.key = key; +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((res = lh_TABNODE_delete(tab, &t)) != NULL) { ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((res = LHM_lh_delete(TABNODE, tab, &t)) != NULL) { + #else + if((res = (TABNODE *)lh_delete(tab, &t)) != NULL) { +@@ -127,7 +140,9 @@ t_old_doall_arg(TABNODE *t, ALL_ARG *a) + TABNODE *res; + + if(t->last_acc < a->lim) +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((res = lh_TABNODE_delete(a->tab, t)) != NULL) { ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((res = LHM_lh_delete(TABNODE, a->tab, t)) != NULL) { + #else + if((res = lh_delete(a->tab, t)) != NULL) { +@@ -145,6 +160,10 @@ IMPLEMENT_LHASH_DOALL_ARG_FN(t_old, TABNODE, ALL_ARG) + IMPLEMENT_LHASH_DOALL_ARG_FN(t_old, TABNODE *, ALL_ARG *) + #endif + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++IMPLEMENT_LHASH_DOALL_ARG(TABNODE,ALL_ARG); ++#endif ++ + /* + * Expire all old nodes + */ +@@ -156,14 +175,16 @@ t_expire(LHASH_OF(TABNODE) *const tab, const time_t lim) + + a.tab = tab; + a.lim = lim; +- down_load = CHECKED_LHASH_OF(TABNODE, tab)->down_load; +- CHECKED_LHASH_OF(TABNODE, tab)->down_load = 0; +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++ down_load = TABNODE_GET_DOWN_LOAD(tab); ++ TABNODE_SET_DOWN_LOAD(tab, 0); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ lh_TABNODE_doall_ALL_ARG(tab, t_old_doall_arg, &a); ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + LHM_lh_doall_arg(TABNODE, tab, LHASH_DOALL_ARG_FN(t_old), ALL_ARG, &a); + #else + lh_doall_arg(tab, LHASH_DOALL_ARG_FN(t_old), &a); + #endif +- CHECKED_LHASH_OF(TABNODE, tab)->down_load = down_load; ++ TABNODE_SET_DOWN_LOAD(tab, down_load); + return; + } + +@@ -173,7 +194,9 @@ t_cont_doall_arg(TABNODE *t, ALL_ARG *arg) + TABNODE *res; + + if(memcmp(t->content, arg->content, arg->cont_len) == 0) +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ if((res = lh_TABNODE_delete(arg->tab, t)) != NULL) { ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + if((res = LHM_lh_delete(TABNODE, arg->tab, t)) != NULL) { + #else + if((res = lh_delete(arg->tab, t)) != NULL) { +@@ -203,15 +226,16 @@ t_clean(LHASH_OF(TABNODE) *const tab, void *const content, const size_t cont_len + a.tab = tab; + a.content = content; + a.cont_len = cont_len; +- down_load = CHECKED_LHASH_OF(TABNODE, tab)->down_load; +- CHECKED_LHASH_OF(TABNODE, tab)->down_load = 0; +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++ down_load = TABNODE_GET_DOWN_LOAD(tab); ++ TABNODE_SET_DOWN_LOAD(tab, 0); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ lh_TABNODE_doall_ALL_ARG(tab, t_cont_doall_arg, &a); ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + LHM_lh_doall_arg(TABNODE, tab, LHASH_DOALL_ARG_FN(t_cont), ALL_ARG, &a); + #else + lh_doall_arg(tab, LHASH_DOALL_ARG_FN(t_cont), &a); + #endif +- CHECKED_LHASH_OF(TABNODE, tab)->down_load = down_load; +- return; ++ TABNODE_SET_DOWN_LOAD(tab, down_load); + } + + /* +@@ -1262,6 +1286,31 @@ RSA_tmp_callback(/* not used */SSL *ssl, /* not used */int is_export, int keylen + return res; + } + ++static int ++generate_key(RSA **ret_rsa, unsigned long bits) ++{ ++#if OPENSSL_VERSION_NUMBER > 0x00908000L ++ int rc = 0; ++ RSA *rsa; ++ ++ rsa = RSA_new(); ++ if (rsa) { ++ BIGNUM *bne = BN_new(); ++ if (BN_set_word(bne, RSA_F4)) ++ rc = RSA_generate_key_ex(rsa, bits, bne, NULL); ++ BN_free(bne); ++ if (rc) ++ *ret_rsa = rsa; ++ else ++ RSA_free(rsa); ++ } ++ return rc; ++#else ++ *ret_rsa = RSA_generate_key(bits, RSA_F4, NULL, NULL); ++ return *ret_rsa != NULL; ++#endif ++} ++ + /* + * Periodically regenerate ephemeral RSA keys + * runs every T_RSA_KEYS seconds +@@ -1274,8 +1323,9 @@ do_RSAgen(void) + RSA *t_RSA1024_keys[N_RSA_KEYS]; + + for(n = 0; n < N_RSA_KEYS; n++) { +- t_RSA512_keys[n] = RSA_generate_key(512, RSA_F4, NULL, NULL); +- t_RSA1024_keys[n] = RSA_generate_key(1024, RSA_F4, NULL, NULL); ++ /* FIXME: Error handling */ ++ generate_key(&t_RSA512_keys[n], 512); ++ generate_key(&t_RSA1024_keys[n], 1024); + } + if(ret_val = pthread_mutex_lock(&RSA_mut)) + logmsg(LOG_WARNING, "thr_RSAgen() lock: %s", strerror(ret_val)); +@@ -1329,11 +1379,11 @@ init_timer(void) + * Pre-generate ephemeral RSA keys + */ + for(n = 0; n < N_RSA_KEYS; n++) { +- if((RSA512_keys[n] = RSA_generate_key(512, RSA_F4, NULL, NULL)) == NULL) { ++ if(!generate_key(&RSA512_keys[n], 512)) { + logmsg(LOG_WARNING,"RSA_generate(%d, 512) failed", n); + return; + } +- if((RSA1024_keys[n] = RSA_generate_key(1024, RSA_F4, NULL, NULL)) == NULL) { ++ if(!generate_key(&RSA1024_keys[n], 1024)) { + logmsg(LOG_WARNING,"RSA_generate(%d, 1024) failed", n); + return; + } +@@ -1420,6 +1470,10 @@ IMPLEMENT_LHASH_DOALL_ARG_FN(t_dump, TABNODE, DUMP_ARG) + IMPLEMENT_LHASH_DOALL_ARG_FN(t_dump, TABNODE *, DUMP_ARG *) + #endif + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++IMPLEMENT_LHASH_DOALL_ARG(TABNODE,DUMP_ARG); ++#endif ++ + /* + * write sessions to the control socket + */ +@@ -1430,7 +1484,9 @@ dump_sess(const int control_sock, LHASH_OF(TABNODE) *const sess, BACKEND *const + + a.control_sock = control_sock; + a.backends = backends; +-#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ lh_TABNODE_doall_DUMP_ARG(sess, t_dump_doall_arg, &a); ++#elif OPENSSL_VERSION_NUMBER >= 0x10000000L + LHM_lh_doall_arg(TABNODE, sess, LHASH_DOALL_ARG_FN(t_dump), DUMP_ARG, &a); + #else + lh_doall_arg(sess, LHASH_DOALL_ARG_FN(t_dump), &a); +@@ -1664,6 +1720,13 @@ thr_control(void *arg) + } + } + ++#ifndef SSL3_ST_SR_CLNT_HELLO_A ++# define SSL3_ST_SR_CLNT_HELLO_A (0x110|SSL_ST_ACCEPT) ++#endif ++#ifndef SSL23_ST_SR_CLNT_HELLO_A ++# define SSL23_ST_SR_CLNT_HELLO_A (0x210|SSL_ST_ACCEPT) ++#endif ++ + void + SSLINFO_callback(const SSL *ssl, int where, int rc) + { --2.17.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 23 lines
Matthew Weber | Pr. Software Engineer | Commercial Avionics COLLINS AEROSPACE 400 Collins Road NE, Cedar Rapids, Iowa 52498, USA Tel: +1 319 295 7349 | FAX: +1 319 263 6099 matthew.weber at collins.com | collinsaerospace.com CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of Collins Aerospace and its affiliated companies. If you are not the intended recipient, please 1) Do not disclose, copy, distribute or use this message or its contents. 2) Advise the sender by return email. 3) Delete all copies (including all attachments) from your computer. Your cooperation is greatly appreciated. Any export restricted material should be shared using my matthew.weber at corp.rockwellcollins.com address.
PATCH v7 3/8 package/pound: Fix build with OpenSSL 1.1.x
Quoted 7 lines · Matthew Weber
Patrick H,
Quoted 3 lines · Patrick Havelange
From: Bernd Kuhls <[email protected]>
Quoted 7 lines
Quoted 3 lines
Signed-off-by Bernd Kuhls <[email protected]>Signed-off-by Patrick Havelange <[email protected]>Does this resolve:
http://autobuild.buildroot.net/results/613/61336369ebe69a57098edabdf94a47f776a0440f/build-end.log
?
Looking at the patch and the error in that build log, it matches, so I would say yes. (I didn't retry locally without the patch applied).
Regards,
Patrick Havelange.
PATCH v7 3/8 package/pound: Fix build with OpenSSL 1.1.x
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
Quoted 11 lines · Matthew Weber
Patrick H,
Quoted 6 lines · Patrick Havelange
From: Bernd Kuhls <[email protected]>
Signed-off-by Bernd Kuhls <[email protected]>Signed-off-by Patrick Havelange <[email protected]>
Quoted 6 lines
Quoted 3 lines
Does this resolve:
http://autobuild.buildroot.net/results/613/61336369ebe69a57098edabdf94a47f776a0440f/build-end.log
?Looking at the patch and the error in that build log, it matches, so I would say yes. (I didn't retry locally without the patch applied).
But the patch breaks builds against libressl:
http://lists.busybox.net/pipermail/buildroot/2019-January/241827.html
Care to fix that and send an updated patch?
Signature · 1 line
Bye, Peter Korsgaard
[Buildroot] [External] Re: [PATCH v7 3/8] package/pound: Fix build with OpenSSL 1.1.x
Peter, Patrick,
Quoted 19 lines · Peter Korsgaard
Quoted 18 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Patrick" == Patrick Havelange <[email protected]> writes:
Quoted 14 lines · Matthew Weber
Patrick H,
Quoted 6 lines · Patrick Havelange
From: Bernd Kuhls <[email protected]>
Signed-off-by Bernd Kuhls <[email protected]>Signed-off-by Patrick Havelange <[email protected]>
Quoted 8 lines
Quoted 2 lines
Looking at the patch and the error in that build log, it matches, so I would say yes. (I didn't retry locally without the patch applied).
But the patch breaks builds against libressl:
Care to fix that and send an updated patch?
Yep, I picked this one up
PATCH v7 4/8 mariadb: use host-openssl from buildroot-system
In reply to Patrick HavelangeFrom: Peter Seiderer <[email protected]>
- change WITH_SSL for host build from bundled to system (and add host-openssl dependency) to avoid the following configure failure:
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GnuTLS (missing: GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) (Required is at least version "3.3.24")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindGnuTLS.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) libmariadb/CMakeLists.txt:298 (FIND_PACKAGE)
---
Changes v7:
- none
Changes v6:
- none
--- package/mariadb/mariadb.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/mariadb/mariadb.mk +2 -1
@@ -86,7 +86,8 @@ MARIADB_CONF_OPTS += \ -DMYSQL_DATADIR=/var/lib/mysql \ -DMYSQL_UNIX_ADDR=$(MYSQL_SOCKET) -HOST_MARIADB_CONF_OPTS += -DWITH_SSL=OFF +HOST_MARIADB_DEPENDENCIES = host-openssl +HOST_MARIADB_CONF_OPTS += -DWITH_SSL=system # Some helpers must be compiled for host in order to crosscompile mariadb for # the target. They are then included by import_executables.cmake which is
Signature · 1 line
2.17.1
PATCH v7 4/8 mariadb: use host-openssl from buildroot-system
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
Hi,
Quoted 31 lines
From: Peter Seiderer <[email protected]>
- changeWITH_SSLfor host build from bundled to system (and add host-openssl dependency) to avoid the following configure failure:CMake Error at
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137(message):
Could NOT find GnuTLS (missing:GNUTLS_LIBRARYGNUTLS_INCLUDE_DIR) (Required is at least version "3.3.24")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378(_FPHSA_FAILURE_MESSAGE)/usr/share/cmake/Modules/FindGnuTLS.cmake:54(FIND_PACKAGE_HANDLE_STANDARD_ARGS)libmariadb/CMakeLists.txt:298(FIND_PACKAGE)Signed-off-by Peter Seiderer <[email protected]>Tested-by Ryan Coe <[email protected]>Signed-off-by Patrick Havelange <[email protected]>---
Changes v7:
- noneChanges v6:
- none--- package/mariadb/mariadb.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)package/mariadb/mariadb.mk +0
-0
package/mariadb/mariadb.mk MARIADB_CONF_OPTS += \ · line 90
Quoted 6 lines
package/mariadb/mariadb.mk +2
-1@@ -86,7 +86,8 @@ MARIADB_CONF_OPTS += \ -DMYSQL_DATADIR=/var/lib/mysql \ -DMYSQL_UNIX_ADDR=$(MYSQL_SOCKET) -HOST_MARIADB_CONF_OPTS += -DWITH_SSL=OFF +HOST_MARIADB_DEPENDENCIES = host-openssl +HOST_MARIADB_CONF_OPTS += -DWITH_SSL=system
I don't quite get this patch. What is the relation to the openssl bump?
From the error message it sounds like mariadb perhaps has gnutls support, and it ends up falling back to that if SSL support is disabled? Can't we just disable that?
Signature · 1 line
Bye, Peter Korsgaard
PATCH v7 4/8 mariadb: use host-openssl from buildroot-system
Hello Peter, Patrick,
Quoted 38 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
Hi,
Quoted 3 lines
From: Peter Seiderer <[email protected]>
- changeWITH_SSLfor host build from bundled to system (and add host-openssl dependency) to avoid the following configure failure:
9276747defdd4f91ec21ba0930afdf6d947730b6Quoted 29 lines
CMake Error at
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137(message):
Could NOT find GnuTLS (missing:GNUTLS_LIBRARYGNUTLS_INCLUDE_DIR) (Required is at least version "3.3.24")
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378(_FPHSA_FAILURE_MESSAGE)/usr/share/cmake/Modules/FindGnuTLS.cmake:54(FIND_PACKAGE_HANDLE_STANDARD_ARGS)libmariadb/CMakeLists.txt:298(FIND_PACKAGE)Signed-off-by Peter Seiderer <[email protected]>Tested-by Ryan Coe <[email protected]>Signed-off-by Patrick Havelange <[email protected]>---
Changes v7:
- noneChanges v6:
- none--- package/mariadb/mariadb.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)package/mariadb/mariadb.mk +0
-0@@ -86,7 +86,8 @@ MARIADB_CONF_OPTS += \ -DMYSQL_DATADIR=/var/lib/mysql \ -DMYSQL_UNIX_ADDR=$(MYSQL_SOCKET)
Quoted 5 lines
package/mariadb/mariadb.mk MARIADB_CONF_OPTS += \ · line 90
Quoted 3 lines
package/mariadb/mariadb.mk +2
-1-HOST_MARIADB_CONF_OPTS += -DWITH_SSL=OFF +HOST_MARIADB_DEPENDENCIES = host-openssl +HOST_MARIADB_CONF_OPTS += -DWITH_SSL=systemI don't quite get this patch. What is the relation to the openssl bump?
It was related back in 2018 when suggested by Ryan Coe ([1])...
Quoted 5 lines
From the error message it sounds like mariadb perhaps has gnutls support, and it ends up falling back to that if SSL support is disabled? Can't we just disable that?
...and pre commit 9276747defdd4f91ec21ba0930afdf6d947730b6 which disabled ssl support for the host build (did not get it right while rebasing the openssl bump patch series), so yes, this patch can be dropped...
Regards,
Peter
[1] http://lists.busybox.net/pipermail/buildroot/2018-June/223349.html
[2] https://git.buildroot.net/buildroot/commit/package/mariadb?id=9276747defdd4f91ec21ba0930afdf6d947730b6
PATCH v7 4/8 mariadb: use host-openssl from buildroot-system
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Seiderer <[email protected]> writes:
Hi,
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
+HOST_MARIADB_CONF_OPTS += -DWITH_SSL=system
I don't quite get this patch. What is the relation to the openssl bump?
It was related back in 2018 when suggested by Ryan Coe ([1])...
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
From the error message it sounds like mariadb perhaps has gnutls support, and it ends up falling back to that if SSL support is disabled? Can't we just disable that?
...and pre commit
9276747defdd4f91ec21ba0930afdf6d947730b6which disabled ssl support for the host build (did not get it right while rebasing the openssl bump patch series), so yes, this patch can be dropped...
Thanks, I have marked it as rejected in patchwork.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v7 5/8 Introduce the variable BR2_TOOLCHAIN_HAS_UCONTEXT
In reply to Patrick HavelangeIt is set when the platform exposes the struct ucontext_t.
This avoids duplication of logic inside each package requiring the use of that type.
---
Changes v7:
- none
Changes v6:
- Wrap Config.in at 80 char
--- package/libsigsegv/Config.in | 11 +---------- toolchain/Config.in | 10 ++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-)
package/libsigsegv/Config.in +1 -10
@@ -1,15 +1,6 @@ config BR2_PACKAGE_LIBSIGSEGV_ARCH_SUPPORTS bool - # with glibc/musl, ucontext is available for all supported - # architectures - default y if BR2_TOOLCHAIN_USES_GLIBC - default y if BR2_TOOLCHAIN_USES_MUSL - # with uclibc, ucontext is only available for a subset of the - # supported architectures - default y if BR2_TOOLCHAIN_USES_UCLIBC && \ - (BR2_ARM_CPU_HAS_ARM || BR2_i386 || \ - BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ - BR2_sparc || BR2_x86_64) + default y if BR2_TOOLCHAIN_HAS_UCONTEXT config BR2_PACKAGE_LIBSIGSEGV bool "libsigsegv"
toolchain/Config.in +10 -0
@@ -15,10 +15,16 @@ config BR2_TOOLCHAIN_USES_GLIBC select BR2_TOOLCHAIN_HAS_THREADS select BR2_TOOLCHAIN_HAS_THREADS_DEBUG select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_HAS_UCONTEXT select BR2_TOOLCHAIN_SUPPORTS_PIE config BR2_TOOLCHAIN_USES_UCLIBC bool + # ucontext is only available for a subset of the supported + # architectures + select BR2_TOOLCHAIN_HAS_UCONTEXT if BR2_ARM_CPU_HAS_ARM || BR2_i386 \ + || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el \ + || BR2_sparc || BR2_x86_64 select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_m68k && !BR2_microblaze && !BR2_STATIC_LIBS config BR2_TOOLCHAIN_USES_MUSL
@@ -28,6 +34,7 @@ config BR2_TOOLCHAIN_USES_MUSL select BR2_TOOLCHAIN_HAS_THREADS select BR2_TOOLCHAIN_HAS_THREADS_DEBUG select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_HAS_UCONTEXT select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_STATIC_LIBS choice
@@ -145,6 +152,9 @@ config BR2_TOOLCHAIN_HAS_THREADS_NPTL config BR2_TOOLCHAIN_HAS_SSP bool +config BR2_TOOLCHAIN_HAS_UCONTEXT + bool + config BR2_TOOLCHAIN_SUPPORTS_PIE bool
Signature · 1 line
2.17.1
PATCH v7 5/8 Introduce the variable BR2_TOOLCHAIN_HAS_UCONTEXT
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
It is set when the platform exposes the struct
ucontext_t. This avoids duplication of logic inside each package requiring the use of that type.
Quoted 8 lines
Signed-off-by Patrick Havelange <[email protected]>---
Changes v7:
- noneChanges v6:
- Wrap Config.in at 80 char
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v7 6/8 package/thrift: bump to 0.12.0, add support for openssl 1.1.x
In reply to Patrick HavelangeSwitching to CMake as the autotools are not crosscompiler compatible. Removed the patches related to autotools as no longer used. Added patch to avoid linker issue.
Added license hash.
---
Changes v7:
- none
Changes v6:
- Commit msg
- Use SHA256 instead of md5
--- ...ipedTransport-peek-to-avoid-linker-e.patch | 31 +++++++ package/thrift/0001-libevent-cross.patch | 16 ---- package/thrift/0002-autoreconf.patch | 28 ------- package/thrift/0003-zlib-cross.patch | 16 ---- ...k-minimum-required-version-of-automa.patch | 47 ----------- .../0005-configure.ac-C-11-is-optional.patch | 28 ------- package/thrift/thrift.hash | 6 +- package/thrift/thrift.mk | 84 +++++++++---------- 8 files changed, 73 insertions(+), 183 deletions(-) create mode 100644 package/thrift/0001-Force-to-keep-TPipedTransport-peek-to-avoid-linker-e.patch delete mode 100644 package/thrift/0001-libevent-cross.patch delete mode 100644 package/thrift/0002-autoreconf.patch delete mode 100644 package/thrift/0003-zlib-cross.patch delete mode 100644 package/thrift/0004-THRIFT-3071-check-minimum-required-version-of-automa.patch delete mode 100644 package/thrift/0005-configure.ac-C-11-is-optional.patch
package/thrift/0001-Force-to-keep-TPipedTransport-peek-to-avoid-linker-e.patch new file +31 -0
@@ -0,0 +1,31 @@ +From f87ae3963e651fe9f4b3125192c77aae86c007e0 Mon Sep 17 00:00:00 2001 +From: Patrick Havelange <[email protected]> +Date: Mon, 21 Jan 2019 09:49:23 +0100 +Subject: [PATCH] Force to keep TPipedTransport::peek() to avoid linker error. + +Otherwise got the "defined in discarded section" linker error +with x86-64-musl toolchain. This is probably a toolchain issue - the +compiler shouldn't remove that function. + +Signed-off-by: Patrick Havelange <[email protected]> +Upstream-status: Not Applicable +--- + lib/cpp/src/thrift/transport/TTransportUtils.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/cpp/src/thrift/transport/TTransportUtils.h b/lib/cpp/src/thrift/transport/TTransportUtils.h +index f3b4c5a..7589182 100644 +--- a/lib/cpp/src/thrift/transport/TTransportUtils.h ++++ b/lib/cpp/src/thrift/transport/TTransportUtils.h +@@ -114,7 +114,7 @@ public: + + bool isOpen() { return srcTrans_->isOpen(); } + +- bool peek() { ++ bool __attribute__ ((used)) peek() { + if (rPos_ >= rLen_) { + // Double the size of the underlying buffer if it is full + if (rLen_ == rBufSize_) { +-- +2.17.1 +
package/thrift/0001-libevent-cross.patch deleted +0 -16
@@ -1,16 +0,0 @@ -Make it cross-compile happy the hard way, there's no clean way. - -Signed-off-by: Gustavo Zacarias <[email protected]> - -diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_event.m4 thrift-0.9.1/aclocal/ax_lib_event.m4 ---- thrift-0.9.1.orig/aclocal/ax_lib_event.m4 2013-08-15 11:04:29.000000000 -0300 -+++ thrift-0.9.1/aclocal/ax_lib_event.m4 2013-10-07 20:40:44.076435613 -0300 -@@ -75,7 +75,7 @@ - AC_LANG_PUSH([C]) - dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling, - dnl but then the version cannot be checked. -- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include <sys/types.h> - #include <event.h> - ]], [[
package/thrift/0002-autoreconf.patch deleted +0 -28
@@ -1,28 +0,0 @@ -Fillers to make autoreconf (automake) happy. - -Signed-off-by: Gustavo Zacarias <[email protected]> - -diff -Nura thrift-0.9.2.orig/AUTHORS thrift-0.9.2/AUTHORS ---- thrift-0.9.2.orig/AUTHORS 1969-12-31 21:00:00.000000000 -0300 -+++ thrift-0.9.2/AUTHORS 2014-12-05 14:46:20.431211224 -0300 -@@ -0,0 +1,2 @@ -+ -+ -diff -Nura thrift-0.9.2.orig/ChangeLog thrift-0.9.2/ChangeLog ---- thrift-0.9.2.orig/ChangeLog 1969-12-31 21:00:00.000000000 -0300 -+++ thrift-0.9.2/ChangeLog 2014-12-05 14:46:34.290686170 -0300 -@@ -0,0 +1,2 @@ -+ -+ -diff -Nura thrift-0.9.2.orig/NEWS thrift-0.9.2/NEWS ---- thrift-0.9.2.orig/NEWS 1969-12-31 21:00:00.000000000 -0300 -+++ thrift-0.9.2/NEWS 2014-12-05 14:46:32.308618241 -0300 -@@ -0,0 +1,2 @@ -+ -+ -diff -Nura thrift-0.9.2.orig/README thrift-0.9.2/README ---- thrift-0.9.2.orig/README 1969-12-31 21:00:00.000000000 -0300 -+++ thrift-0.9.2/README 2014-12-05 14:46:28.305481028 -0300 -@@ -0,0 +1,2 @@ -+ -+
package/thrift/0003-zlib-cross.patch deleted +0 -16
@@ -1,16 +0,0 @@ -Make zlib version detection cross-compile happy. - -Signed-off-by: Gustavo Zacarias <[email protected]> - -diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4 thrift-0.9.1/aclocal/ax_lib_zlib.m4 ---- thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4 2013-08-15 11:04:29.000000000 -0300 -+++ thrift-0.9.1/aclocal/ax_lib_zlib.m4 2013-10-07 20:47:44.523177973 -0300 -@@ -73,7 +73,7 @@ - # (defined in the library). - AC_LANG_PUSH([C]) - dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling. -- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include <zlib.h> - #if ZLIB_VERNUM >= 0x$WANT_ZLIB_VERSION - #else
package/thrift/0004-THRIFT-3071-check-minimum-required-version-of-automa.patch deleted +0 -47
47 lines not on this page · raw message
package/thrift/0005-configure.ac-C-11-is-optional.patch deleted +0 -28
@@ -1,28 +0,0 @@ -From 9c3a7e79b256730dd85a7acadbaf57ab018b3127 Mon Sep 17 00:00:00 2001 -From: Romain Naour <[email protected]> -Date: Tue, 7 Apr 2015 07:37:26 +0200 -Subject: [PATCH] configure.ac: C++11 is optional - -Thrift build fine whitout c++11 support. - -Signed-off-by: Romain Naour <[email protected]> ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 8daeb03..bfd49ae 100755 ---- a/configure.ac -+++ b/configure.ac -@@ -99,7 +99,7 @@ AC_PROG_AWK - AC_PROG_RANLIB - - AC_LANG([C++]) --AX_CXX_COMPILE_STDCXX_11([noext]) -+AX_CXX_COMPILE_STDCXX_11([noext], [optional]) - - AC_ARG_ENABLE([libs], - AS_HELP_STRING([--enable-libs], [build the Apache Thrift libraries [default=yes]]), --- -1.9.3 -
package/thrift/thrift.hash +4 -2
@@ -1,2 +1,4 @@ -# From https://www.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz.md5 -md5 89f63cc4d0100912f4a1f8a9dee63678 thrift-0.9.2.tar.gz +# From https://www.apache.org/dist/thrift/0.12.0/thrift-0.12.0.tar.gz.sha256 +sha256 c336099532b765a6815173f62df0ed897528a9d551837d627c1f87fadad90428 thrift-0.12.0.tar.gz +# License files, locally calculated +sha256 23df881cec3192d1f4474633c14eb2ec30a45b84f8daeb82b9de5d2bd3ac8218 LICENSE
package/thrift/thrift.mk +38 -46
113 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v7 7/8 package/rtmpdump: Fix compilation issues with openssl 1.1.x
In reply to Patrick HavelangeFrom: Vadim Kochan <[email protected]>
Upstream is dead, other distros use gnutls exclusively, so patch is not sent upstream.
---
Changes v7:
- none
Changes v6:
- Commit msg
--- ...p-Fix-compilation-with-openssl-1.1.x.patch | 276 ++++++++++++++++++ 1 file changed, 276 insertions(+) create mode 100644 package/rtmpdump/0001-librtmp-Fix-compilation-with-openssl-1.1.x.patch
package/rtmpdump/0001-librtmp-Fix-compilation-with-openssl-1.1.x.patch new file +276 -0
@@ -0,0 +1,276 @@ +From f3ca4b9450e273afc5b773e5e5637b7fcbc71dd8 Mon Sep 17 00:00:00 2001 +From: Vadim Kochan <[email protected]> +Date: Fri, 18 Jan 2019 01:15:33 +0200 +Subject: [PATCH] librtmp: Fix compilation with openssl 1.1.x + +Signed-off-by: Vadim Kochan <[email protected]> +--- + librtmp/dh.h | 70 +++++++++++++++++++++++++++++++++++++++++++---------- + librtmp/handshake.h | 13 ++++++---- + librtmp/hashswf.c | 18 +++++++++----- + librtmp/rtmp.c | 4 +-- + 4 files changed, 78 insertions(+), 27 deletions(-) + +diff --git a/librtmp/dh.h b/librtmp/dh.h +index 5fc3f32..2cf6b8c 100644 +--- a/librtmp/dh.h ++++ b/librtmp/dh.h +@@ -186,6 +186,32 @@ typedef BIGNUM * MP_t; + #define MDH_free(dh) DH_free(dh) + #define MDH_generate_key(dh) DH_generate_key(dh) + #define MDH_compute_key(secret, seclen, pub, dh) DH_compute_key(secret, pub, dh) ++#define MDH_set_g(dh, g) DH_set0_pqg(dh, NULL, NULL, g) ++#define MDH_set_p(dh, p) DH_set0_pqg(dh, p, NULL, NULL) ++#define MDH_set_len(dh, l) DH_set_length(dh, l) ++#define MDH_set_pub_key(dh, pub) DH_set0_key(dh, pub, NULL) ++#define MDH_set_priv_key(dh, priv) DH_set0_key(dh, NULL, priv) ++ ++static inline BIGNUM *MDH_get_p(DH *dh) ++{ ++ const BIGNUM *p; ++ DH_get0_pqg(dh, &p, NULL, NULL); ++ return (BIGNUM *) p; ++} ++ ++static inline BIGNUM *MDH_get_pub_key(DH *dh) ++{ ++ const BIGNUM *pub; ++ DH_get0_key(dh, &pub, NULL); ++ return (BIGNUM *) pub; ++} ++ ++static inline BIGNUM *MDH_get_priv_key(DH *dh) ++{ ++ const BIGNUM *priv; ++ DH_get0_key(dh, NULL, &priv); ++ return (BIGNUM *) priv; ++} + + #endif + +@@ -249,24 +275,28 @@ DHInit(int nKeyBits) + { + size_t res; + MDH *dh = MDH_new(); ++ MP_t g, p; + + if (!dh) + goto failed; + +- MP_new(dh->g); ++ MP_new(g); + +- if (!dh->g) ++ if (g) + goto failed; + +- MP_gethex(dh->p, P1024, res); /* prime P1024, see dhgroups.h */ ++ MDH_set_g(dh, g); ++ p = MDH_get_p(dh); ++ MP_gethex(p, P1024, res); /* prime P1024, see dhgroups.h */ + if (!res) + { + goto failed; + } + +- MP_set_w(dh->g, 2); /* base 2 */ ++ MDH_set_p(dh, p); ++ MP_set_w(g, 2); /* base 2 */ ++ MDH_set_len(dh, nKeyBits); + +- dh->length = nKeyBits; + return dh; + + failed: +@@ -286,6 +316,9 @@ DHGenerateKey(MDH *dh) + while (!res) + { + MP_t q1 = NULL; ++ MP_t priv_key; ++ MP_t pub_key; ++ MP_t p; + + if (!MDH_generate_key(dh)) + return 0; +@@ -293,12 +326,17 @@ DHGenerateKey(MDH *dh) + MP_gethex(q1, Q1024, res); + assert(res); + +- res = isValidPublicKey(dh->pub_key, dh->p, q1); ++ priv_key = MDH_get_priv_key(dh); ++ pub_key = MDH_get_pub_key(dh); ++ p = MDH_get_p(dh); ++ ++ res = isValidPublicKey(pub_key, p, q1); + if (!res) + { +- MP_free(dh->pub_key); +- MP_free(dh->priv_key); +- dh->pub_key = dh->priv_key = 0; ++ MP_free(pub_key); ++ MP_free(priv_key); ++ MDH_set_pub_key(dh, NULL); ++ MDH_set_priv_key(dh, NULL); + } + + MP_free(q1); +@@ -313,16 +351,22 @@ DHGenerateKey(MDH *dh) + static int + DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) + { ++ MP_t pub_key; + int len; +- if (!dh || !dh->pub_key) ++ ++ if (!dh) ++ return 0; ++ ++ pub_key = MDH_get_pub_key(dh); ++ if (!pub_key) + return 0; + +- len = MP_bytes(dh->pub_key); ++ len = MP_bytes(pub_key); + if (len <= 0 || len > (int) nPubkeyLen) + return 0; + + memset(pubkey, 0, nPubkeyLen); +- MP_setbin(dh->pub_key, pubkey + (nPubkeyLen - len), len); ++ MP_setbin(pub_key, pubkey + (nPubkeyLen - len), len); + return 1; + } + +@@ -364,7 +408,7 @@ DHComputeSharedSecretKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen, + MP_gethex(q1, Q1024, len); + assert(len); + +- if (isValidPublicKey(pubkeyBn, dh->p, q1)) ++ if (isValidPublicKey(pubkeyBn, MDH_get_p(dh), q1)) + res = MDH_compute_key(secret, nPubkeyLen, pubkeyBn, dh); + else + res = -1; +diff --git a/librtmp/handshake.h b/librtmp/handshake.h +index 0438486..1e84b3a 100644 +--- a/librtmp/handshake.h ++++ b/librtmp/handshake.h +@@ -69,9 +69,9 @@ typedef struct arcfour_ctx* RC4_handle; + #if OPENSSL_VERSION_NUMBER < 0x0090800 || !defined(SHA256_DIGEST_LENGTH) + #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256 + #endif +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, dig, &dlen); HMAC_CTX_cleanup(&ctx) ++#define HMAC_setup(ctx, key, len) HMAC_CTX_reset(ctx); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0) ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, dig, &dlen); + + typedef RC4_KEY * RC4_handle; + #define RC4_alloc(h) *h = malloc(sizeof(RC4_KEY)) +@@ -117,7 +117,7 @@ static void InitRC4Encryption + { + uint8_t digest[SHA256_DIGEST_LENGTH]; + unsigned int digestLen = 0; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx = HMAC_CTX_new(); + + RC4_alloc(rc4keyIn); + RC4_alloc(rc4keyOut); +@@ -139,6 +139,8 @@ static void InitRC4Encryption + RTMP_LogHex(RTMP_LOGDEBUG, digest, 16); + + RC4_setkey(*rc4keyIn, 16, digest); ++ ++ HMAC_CTX_free(ctx); + } + + typedef unsigned int (getoff)(uint8_t *buf, unsigned int len); +@@ -266,12 +268,13 @@ HMACsha256(const uint8_t *message, size_t messageLen, const uint8_t *key, + size_t keylen, uint8_t *digest) + { + unsigned int digestLen; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx = HMAC_CTX_new(); + + HMAC_setup(ctx, key, keylen); + HMAC_crunch(ctx, message, messageLen); + HMAC_finish(ctx, digest, digestLen); + ++ HMAC_CTX_free(ctx); + assert(digestLen == 32); + } + +diff --git a/librtmp/hashswf.c b/librtmp/hashswf.c +index 9f4e2c0..ba2c228 100644 +--- a/librtmp/hashswf.c ++++ b/librtmp/hashswf.c +@@ -57,10 +57,10 @@ + #include <openssl/sha.h> + #include <openssl/hmac.h> + #include <openssl/rc4.h> +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, (unsigned char *)key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, (unsigned char *)buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, (unsigned char *)dig, &dlen); +-#define HMAC_close(ctx) HMAC_CTX_cleanup(&ctx) ++#define HMAC_setup(ctx, key, len) HMAC_CTX_reset(ctx); HMAC_Init_ex(ctx, (unsigned char *)key, len, EVP_sha256(), 0) ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, (unsigned char *)buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, (unsigned char *)dig, &dlen); ++#define HMAC_close(ctx) + #endif + + extern void RTMP_TLS_Init(); +@@ -289,7 +289,7 @@ leave: + struct info + { + z_stream *zs; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + int first; + int zlib; + int size; +@@ -582,6 +582,10 @@ RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash, + } + + in.first = 1; ++ in.ctx = HMAC_CTX_new(); ++ if (!in.ctx) ++ goto out; ++ + HMAC_setup(in.ctx, "Genuine Adobe Flash Player 001", 30); + inflateInit(&zs); + in.zs = &zs; +@@ -621,7 +625,7 @@ RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash, + "%s: couldn't open %s for writing, errno %d (%s)", + __FUNCTION__, path, err, strerror(err)); + ret = -1; +- goto out; ++ goto free_ctx; + } + fseek(f, 0, SEEK_END); + q = strchr(url, '?'); +@@ -649,6 +653,8 @@ RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash, + } + } + HMAC_close(in.ctx); ++free_ctx: ++ HMAC_CTX_free(in.ctx); + out: + free(path); + if (f) +diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c +index a2863b0..c995568 100644 +--- a/librtmp/rtmp.c ++++ b/librtmp/rtmp.c +@@ -245,9 +245,7 @@ RTMP_TLS_Init() + "ca.pem", GNUTLS_X509_FMT_PEM); + #elif !defined(NO_SSL) /* USE_OPENSSL */ + /* libcrypto doesn't need anything special */ +- SSL_load_error_strings(); +- SSL_library_init(); +- OpenSSL_add_all_digests(); ++ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); + RTMP_TLS_ctx = SSL_CTX_new(SSLv23_method()); + SSL_CTX_set_options(RTMP_TLS_ctx, SSL_OP_ALL); + SSL_CTX_set_default_verify_paths(RTMP_TLS_ctx); +-- +2.14.1 +
Signature · 1 line
2.17.1
PATCH v7 7/8 package/rtmpdump: Fix compilation issues with openssl 1.1.x
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
From: Vadim Kochan <[email protected]> Upstream is dead, other distros use gnutls exclusively, so patch is not sent upstream.
So shouldn't we do the same?
What other distributions exactly?
Signature · 1 line
Bye, Peter Korsgaard
PATCH v7 7/8 package/rtmpdump: Fix compilation issues with openssl 1.1.x
Quoted 9 lines · Peter Korsgaard
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
From: Vadim Kochan <[email protected]> Upstream is dead, other distros use gnutls exclusively, so patch is not sent upstream.
So shouldn't we do the same?
What other distributions exactly?
IIRC I checked at least Fedora and Debian, possibly also Gentoo and/or Arch.
Regards,
Arnout
PATCH v7 7/8 package/rtmpdump: Fix compilation issues with openssl 1.1.x
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Quoted 6 lines · Peter Korsgaard
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
From: Vadim Kochan <[email protected]> Upstream is dead, other distros use gnutls exclusively, so patch is not sent upstream.
Quoted 5 lines
Quoted 3 lines
So shouldn't we do the same?
What other distributions exactly?
IIRC I checked at least Fedora and Debian, possibly also Gentoo and/or Arch.
Ok, which probably makes sense for a binary distribution.
It is not exactly clear to me where this patch comes from. Googling around I see a very similar patch on this github repo:
https://github.com/JudgeZarbi/RTMPDump-OpenSSL-1.1
But that repo has an open issue about a crash in the handshake handling (code that gets changed by this patch) and the README states:
I modified a few of the files in the librtmp directory to conform to the new getters and setters in OpenSSL 1.1.0. I don't claim to be a security expert, and neither have I had any experience with OpenSSL in a programming sense, so I'm not sure exactly if it's correct, but it compiles and seems to work for what I use it for.
Which does not sound very reassuring to me, so I have instead pushed a patch to drop the openssl support for rtmpdump.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v7 8/8 libopenssl: bump version to 1.1.1a
In reply to Patrick HavelangeFrom: Peter Seiderer <[email protected]>
- use BR2_TOOLCHAIN_HAS_UCONTEXT
This is used to set -DOPENSSL_NO_ASYNC if needed.
- apply the CFLAGS correctly when compiling with -Os (bugfix).
- use -latomic when needed
This fixes the build for br-sparc-uclibc-2018.05
- don't use madvise() if no MMU
Trying to do so results in undefined reference to madvise() as it is not available on uclibc without MMU.
The original openssl code checks if a macro used in the madvise call is defined. The problem comes from the fact that the code in crypto/mem_sec.c also includes a kernel header defining the same macro unconditionally. Thus the check is always true in that case.
Upstream: https://github.com/openssl/openssl/pull/8089
- don't compile test/fuzzers
These binaries introduced with 1.1.x sometimes do not compile. This is the case with the br-arm-cortex-m4-full toolchain
- don't build ocsp daemon if no MMU.
Patch from Richard Levitte.
- correctly enable cryptodev engine
Thanks to Arnout Vandecappelle for spotting this.
- remove all parallel build patches (openssl build-system changed)
- rebased 0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch to apply to Configurations/unix-Makefile.tmpl (Makefile template)
- removed 0002-cryptodev-Fix-issue-with-signature-generation.patch (upstream applied)
- rebased 0003-Reproducible-build-do-not-leak-compiler-path.patch to apply to crypto/build.info (Makefile template)
- fix musl/uclibc build failure, use '-DOPENSSL_NO_ASYNC'
- remove legacy enable-tlsext configure option
- remove target/host libdir configure options, fixes openssl.pc installation path, fixes wget compile
- change legacy INSTALL_PREFIX to DESTDIR
- remove 'libraries gets installed read only, so strip fails' workaround (not needed anymore)
- change engine directory from /usr/lib/engines to /usr/lib/engines-1.1
- change license file hash, no license change, only the following hint was removed:
Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact openssl-core at openssl.org.
---
Changes v6 -> v7:
- none
Changes v5 -> v6:
- use BR2_TOOLCHAIN_HAS_UCONTEXT
- apply the CFLAGS correctly
- use -latomic when needed
- don't use madvise() if no MMU
- don't compile test/fuzzers
- don't build ocsp daemon if no MMU
- correctly enable cryptodev engine
- remove explicit rpath argument
Changes v4 -> v5:
- remove libdir config options (suggested by Arnout Vandecappelle)
Changes v3 -> v4:
- bump version to 1.1.1a
- remove all parallel build patches hash file entries
- re-remove 0004-Revert-util-dofile.pl-only-quote-stuff-that-actually.patch (upstream applied)
- fix hist library install path
- removed 0002-cryptodev-Fix-issue-with-signature-generation.patch (upstram applied)
- remove follow up patch for openssh (not longer needed since version bump to 7.9p1, see https://www.openssh.com/releasenotes.html
Portability)
Changes v2 -> v3:
- no changes
Changes v1 -> v2:
- add OPENSSL_NO_ASYNC workaround for musl compile too (suggested by Bernd Kuhls)
- fix host-libopenssl compile (reported by Ryan Coe) by setting rpath (suggested by Ryan Coe)
- fix 0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch and 0003-Reproducible-build-do-not-leak-compiler-path.patch to apply to the Makefile templates (instead of re-generated Makefile) (reported by Ryan Coe)
- add 0004-Revert-util-dofile.pl-only-quote-stuff-that-actually.patch (suggested by Bernd Kuhls)
--- ...building-manpages-if-we-re-not-going.patch | 34 +- ...-Fix-issue-with-signature-generation.patch | 450 ------------------ ...ible-build-do-not-leak-compiler-path.patch | 31 +- ...ENSSL_NO_MADVISE-to-disable-call-to-.patch | 27 ++ ...the-same-HAVE_FORK-NO_FORK-as-in-spe.patch | 46 ++ package/libopenssl/libopenssl.hash | 15 +- package/libopenssl/libopenssl.mk | 59 ++- 7 files changed, 147 insertions(+), 515 deletions(-) delete mode 100644 package/libopenssl/0002-cryptodev-Fix-issue-with-signature-generation.patch create mode 100644 package/libopenssl/0004-Introduce-the-OPENSSL_NO_MADVISE-to-disable-call-to-.patch create mode 100644 package/libopenssl/0005-apps-ocsp.c-Use-the-same-HAVE_FORK-NO_FORK-as-in-spe.patch
package/libopenssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch +19 -15
@@ -1,27 +1,31 @@ -From 389efb564fa1453a9da835393eec9006bfae2a52 Mon Sep 17 00:00:00 2001 +From d8f104bffb0c4acb8c5fcdf49628f7d02ed48f7f Mon Sep 17 00:00:00 2001 From: Mike Frysinger <[email protected]> Date: Sat, 16 May 2015 18:53:51 +0200 -Subject: Dont waste time building manpages if we're not going to use em. +Subject: [PATCH] Dont waste time building manpages if we're not going to use + em. Signed-off-by: Ryan Barnett <[email protected]> [Gustavo: update for parallel-build] + +[rebased on openssl-1.1.0h] +Signed-off-by: Peter Seiderer <[email protected]> --- - Makefile.org | 2 +- + Configurations/unix-Makefile.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/Makefile.org b/Makefile.org -index 60f07cc..976ceaf 100644 ---- a/Makefile.org -+++ b/Makefile.org -@@ -527,7 +527,7 @@ dist: - dist_pem_h: - (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) +diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl +index 40cf2c3..777d9ca 100644 +--- a/Configurations/unix-Makefile.tmpl ++++ b/Configurations/unix-Makefile.tmpl +@@ -268,7 +268,7 @@ list-tests: + @echo "Tests are not supported with your chosen Configure options" + @ : {- output_on() if !$disabled{tests}; "" -} + +-install: install_sw install_ssldirs install_docs ++install: install_sw install_ssldirs --install: install_docs install_sw -+install: install_sw + uninstall: uninstall_docs uninstall_sw - install_sw: - @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ -- -1.9.1 +2.16.3
package/libopenssl/0002-cryptodev-Fix-issue-with-signature-generation.patch deleted +0 -450
450 lines not on this page · raw message
package/libopenssl/0003-Reproducible-build-do-not-leak-compiler-path.patch +17 -14
@@ -1,26 +1,29 @@ -From 875fcad2ad84877763cba86c1265b57679b878b0 Mon Sep 17 00:00:00 2001 +From b70be8c65365a8fc564226360d45adbbb29fc0af Mon Sep 17 00:00:00 2001 From: Peter Seiderer <[email protected]> Date: Tue, 24 Oct 2017 16:58:32 +0200 Subject: [PATCH] Reproducible build: do not leak compiler path +Signed-off-by: Peter Seiderer <[email protected]> + +[Rebased on openssl-1.1.1.a] Signed-off-by: Peter Seiderer <[email protected]> --- - crypto/Makefile | 2 +- + crypto/build.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/crypto/Makefile b/crypto/Makefile -index 7869996..7e63291 100644 ---- a/crypto/Makefile -+++ b/crypto/Makefile -@@ -55,7 +55,7 @@ top: - all: shared +diff --git a/crypto/build.info b/crypto/build.info +index 2c619c6..49ca6ab 100644 +--- a/crypto/build.info ++++ b/crypto/build.info +@@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \ + ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl - buildinf.h: ../Makefile -- $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h -+ $(PERL) $(TOP)/util/mkbuildinf.pl "$$(basename $(CC)) $(CFLAGS)" "$(PLATFORM)" >buildinf.h + DEPEND[cversion.o]=buildinf.h +-GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" ++GENERATE[buildinf.h]=../util/mkbuildinf.pl "$$(basename $(CC)) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" + DEPEND[buildinf.h]=../configdata.pm - x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl - $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ + GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME) -- -2.11.0 +2.20.1
package/libopenssl/0004-Introduce-the-OPENSSL_NO_MADVISE-to-disable-call-to-.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 1281ffc7959bd2070563e17a52ee4424196d885c Mon Sep 17 00:00:00 2001 +From: Patrick Havelange <[email protected]> +Date: Wed, 23 Jan 2019 12:21:21 +0100 +Subject: [PATCH] Introduce the OPENSSL_NO_MADVISE to disable call to madvise() + +Upstream: https://github.com/openssl/openssl/pull/8089 +Signed-off-by: Patrick Havelange <[email protected]> +--- + crypto/mem_sec.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c +index 9e0f670..32c7282 100644 +--- a/crypto/mem_sec.c ++++ b/crypto/mem_sec.c +@@ -485,7 +485,7 @@ static int sh_init(size_t size, int minsize) + if (mlock(sh.arena, sh.arena_size) < 0) + ret = 2; + #endif +-#ifdef MADV_DONTDUMP ++#if defined(MADV_DONTDUMP) && !defined(OPENSSL_NO_MADVISE) + if (madvise(sh.arena, sh.arena_size, MADV_DONTDUMP) < 0) + ret = 2; + #endif +-- +2.17.1 +
package/libopenssl/0005-apps-ocsp.c-Use-the-same-HAVE_FORK-NO_FORK-as-in-spe.patch new file +46 -0
46 lines not on this page · raw message
package/libopenssl/libopenssl.hash +5 -10
@@ -1,10 +1,5 @@ -# From https://www.openssl.org/source/openssl-1.0.2q.tar.gz.sha256 -sha256 5744cfcbcec2b1b48629f7354203bc1e5e9b5466998bbccc5b5fcde3b18eb684 openssl-1.0.2q.tar.gz -# From https://www.openssl.org/source/openssl-1.0.2q.tar.gz.sha1 -sha1 692f5f2f1b114f8adaadaa3e7be8cce1907f38c5 openssl-1.0.2q.tar.gz -# Locally computed -sha256 eddd8a5123748052c598214487ac178e4bfa4e31ba2ec520c70d59c8c5bfa2e9 openssl-1.0.2a-parallel-install-dirs.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d -sha256 147c3eeaad614c044749ea527cb433eae5e2d5cad34a78c6ba61cd967bfbe01f openssl-1.0.2a-parallel-obj-headers.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d -sha256 30cb49489de5041841a74da9155cd4fabfbce33237262ba7cd23974314ae2956 openssl-1.0.2a-parallel-symlinking.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d -sha256 deaf6f3af41874ecc6d63841ea14b8e6c71cea81d4a511a754bc90c9a993147f openssl-1.0.2d-parallel-build.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d -sha256 c8f60f4842bbad0353f5d81620e72b168b5638ca3a0a999f5da113b22491612e LICENSE +# From https://www.openssl.org/source/openssl-1.1.1a.tar.gz.sha256 +sha256 fc20130f8b7cbd2fb918b2f14e2f429e109c31ddd0fb38fc5d71d9ffed3f9f41 openssl-1.1.1a.tar.gz + +# License files +sha256 350c7817af2ef980d3f3922bc5e0bb6a9d9f6cc21e784a699bcd2a31c74a84b1 LICENSE
package/libopenssl/libopenssl.mk +33 -26
131 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v7 8/8 libopenssl: bump version to 1.1.1a
Quoted 63 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
From: Peter Seiderer <[email protected]>
- useBR2_TOOLCHAIN_HAS_UCONTEXT
This is used to set -DOPENSSL_NO_ASYNC if needed.- apply the CFLAGS correctly when compiling with -Os (bugfix).
- use -latomic when needed
This fixes the build for br-sparc-uclibc-2018.05- don't use
madvise()if no MMU
Trying to do so results in undefined reference tomadvise()as it is not available on uclibc without MMU.
The original openssl code checks if a macro used in the madvise call is defined. The problem comes from the fact that the code incrypto/mem_sec.calso includes a kernel header defining the same macro unconditionally. Thus the check is always true in that case.
Upstream: https://github.com/openssl/openssl/pull/8089- don't compile test/fuzzers
These binaries introduced with 1.1.x sometimes do not compile. This is the case with the br-arm-cortex-m4-full toolchain- don't build ocsp daemon if no MMU.
Patch from Richard Levitte.- correctly enable cryptodev engine
Thanks to Arnout Vandecappelle for spotting this.- remove all parallel build patches (openssl build-system changed)
- rebased 0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch to apply to Configurations/unix-Makefile.tmpl (
Makefiletemplate)- removed 0002-cryptodev-Fix-issue-with-signature-generation.patch (upstream applied)
- rebased 0003-Reproducible-build-do-not-leak-compiler-path.patch to apply to
crypto/build.info(Makefiletemplate)- fix musl/uclibc build failure, use '-DOPENSSL_NO_ASYNC'
- remove legacy enable-tlsext configure option
- remove target/host libdir configure options, fixes openssl.pc installation path, fixes wget compile
- change legacy
INSTALL_PREFIXto DESTDIR- remove 'libraries gets installed read only, so strip fails' workaround (not needed anymore)
- change engine directory from
/usr/lib/enginesto/usr/lib/engines-1.1- change license file hash, no license change, only the following hint was removed:
Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact openssl-core at openssl.org.
Quoted 8 lines
Signed-off-by Peter Seiderer <[email protected]>Tested-by Ryan Coe <[email protected]>Signed-off-by Vadim Kochan <[email protected]>Signed-off-by Patrick Havelange <[email protected]>---
Changes v6 -> v7:
- none
Committed, thanks all!
Signature · 1 line
Bye, Peter Korsgaard
PATCH v7 8/8 libopenssl: bump version to 1.1.1a
Quoted 59 lines
Quoted 58 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Korsgaard <[email protected]> writes:
From: Peter Seiderer <[email protected]>
- useBR2_TOOLCHAIN_HAS_UCONTEXT
This is used to set -DOPENSSL_NO_ASYNC if needed.- apply the CFLAGS correctly when compiling with -Os (bugfix).
- use -latomic when needed
This fixes the build for br-sparc-uclibc-2018.05- don't use
madvise()if no MMU
Trying to do so results in undefined reference tomadvise()as it is not available on uclibc without MMU.
The original openssl code checks if a macro used in the madvise call is defined. The problem comes from the fact that the code incrypto/mem_sec.calso includes a kernel header defining the same macro unconditionally. Thus the check is always true in that case.
Upstream: https://github.com/openssl/openssl/pull/8089- don't compile test/fuzzers
These binaries introduced with 1.1.x sometimes do not compile. This is the case with the br-arm-cortex-m4-full toolchain- don't build ocsp daemon if no MMU.
Patch from Richard Levitte.- correctly enable cryptodev engine
Thanks to Arnout Vandecappelle for spotting this.- remove all parallel build patches (openssl build-system changed)
- rebased 0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch to apply to Configurations/unix-Makefile.tmpl (
Makefiletemplate)- removed 0002-cryptodev-Fix-issue-with-signature-generation.patch (upstream applied)
- rebased 0003-Reproducible-build-do-not-leak-compiler-path.patch to apply to
crypto/build.info(Makefiletemplate)- fix musl/uclibc build failure, use '-DOPENSSL_NO_ASYNC'
- remove legacy enable-tlsext configure option
- remove target/host libdir configure options, fixes openssl.pc installation path, fixes wget compile
- change legacy
INSTALL_PREFIXto DESTDIR- remove 'libraries gets installed read only, so strip fails' workaround (not needed anymore)
- change engine directory from
/usr/lib/enginesto/usr/lib/engines-1.1- change license file hash, no license change, only the following hint was removed:
Quoted 8 lines
Quoted 8 lines
Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact openssl-core at openssl.org.
Signed-off-by Peter Seiderer <[email protected]>Tested-by Ryan Coe <[email protected]>Signed-off-by Vadim Kochan <[email protected]>Signed-off-by Patrick Havelange <[email protected]>
This looks to break host-android-tools:
http://autobuild.buildroot.net/results/66f/66f05eb9a56aa8526a1420334d68c7eda094e90e/build-end.log
Care to take a look?
Signature · 1 line
Bye, Peter Korsgaard
PATCH v7 8/8 libopenssl: bump version to 1.1.1a
Hi Peter,
Quoted 69 lines · Peter Korsgaard
Quoted 60 lines
Quoted 59 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Peter" == Peter Korsgaard <[email protected]> writes:
From: Peter Seiderer <[email protected]>
- useBR2_TOOLCHAIN_HAS_UCONTEXT
This is used to set -DOPENSSL_NO_ASYNC if needed.- apply the CFLAGS correctly when compiling with -Os (bugfix).
- use -latomic when needed
This fixes the build for br-sparc-uclibc-2018.05- don't use
madvise()if no MMU
Trying to do so results in undefined reference tomadvise()as it is not available on uclibc without MMU.
The original openssl code checks if a macro used in the madvise call is defined. The problem comes from the fact that the code incrypto/mem_sec.calso includes a kernel header defining the same macro unconditionally. Thus the check is always true in that case.
Upstream: https://github.com/openssl/openssl/pull/8089- don't compile test/fuzzers
These binaries introduced with 1.1.x sometimes do not compile. This is the case with the br-arm-cortex-m4-full toolchain- don't build ocsp daemon if no MMU.
Patch from Richard Levitte.- correctly enable cryptodev engine
Thanks to Arnout Vandecappelle for spotting this.- remove all parallel build patches (openssl build-system changed)
- rebased 0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch to apply to Configurations/unix-Makefile.tmpl (
Makefiletemplate)- removed 0002-cryptodev-Fix-issue-with-signature-generation.patch (upstream applied)
- rebased 0003-Reproducible-build-do-not-leak-compiler-path.patch to apply to
crypto/build.info(Makefiletemplate)- fix musl/uclibc build failure, use '-DOPENSSL_NO_ASYNC'
- remove legacy enable-tlsext configure option
- remove target/host libdir configure options, fixes openssl.pc installation path, fixes wget compile
- change legacy
INSTALL_PREFIXto DESTDIR- remove 'libraries gets installed read only, so strip fails' workaround (not needed anymore)
- change engine directory from
/usr/lib/enginesto/usr/lib/engines-1.1- change license file hash, no license change, only the following hint was removed:
Quoted 8 lines
Quoted 8 lines
Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact openssl-core at openssl.org.
Signed-off-by Peter Seiderer <[email protected]>Tested-by Ryan Coe <[email protected]>Signed-off-by Vadim Kochan <[email protected]>Signed-off-by Patrick Havelange <[email protected]>
Quoted 8 lines
This looks to break host-android-tools:
http://autobuild.buildroot.net/results/66f/66f05eb9a56aa8526a1420334d68c7eda094e90e/build-end.log
Care to take a look?
--
Bye, Peter Korsgaard
I think this patch might help:
https://build.opensuse.org/package/view_file/home:plater/android-tools/openssl-1.1.0.patch?expand=0
I can check and send a patch.
Regards,
Vadim Kochan
PATCH v7 1/8 package/libshout: Add support for openssl 1.1.x
In reply to Patrick HavelangeQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Patrick" == Patrick Havelange <[email protected]> writes:
From: Vadim Kochan <[email protected]>
Added patch from Debian:Signed-off-by Vadim Kochan <[email protected]>Signed-off-by Patrick Havelange <[email protected]>
Quoted 6 lines
---
Changes v7:
- Restore original link to original patch in commit msgChanges v6:
- Added Signed-off-by to the patch
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard