aboutsummaryrefslogtreecommitdiffstats
path: root/main/libevent
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-04-03 07:04:02 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-04-06 05:19:20 +0000
commite213a9103dba0cacaae5f00cf1b623e4e999382f (patch)
tree8b6d9a81b12dfddb3c10da92d353bd2348ebca73 /main/libevent
parent7f09f1f98a8038b6b31429f16baff001c062e5fd (diff)
downloadaports-e213a9103dba0cacaae5f00cf1b623e4e999382f.tar.bz2
aports-e213a9103dba0cacaae5f00cf1b623e4e999382f.tar.xz
main/libevent: rebuild against libressl-2.7
Diffstat (limited to 'main/libevent')
-rw-r--r--main/libevent/APKBUILD4
-rw-r--r--main/libevent/libressl-2.7.patch13
-rw-r--r--main/libevent/libressl.patch97
3 files changed, 15 insertions, 99 deletions
diff --git a/main/libevent/APKBUILD b/main/libevent/APKBUILD
index 0ae76a019d..d00b53fa40 100644
--- a/main/libevent/APKBUILD
+++ b/main/libevent/APKBUILD
@@ -13,7 +13,7 @@ depends_dev="python2"
makedepends="$depends_dev libressl-dev"
subpackages="$pkgname-dev"
source="https://github.com/$pkgname/$pkgname/releases/download/release-$_pkgver/$pkgname-$_pkgver.tar.gz
- libressl.patch
+ libressl-2.7.patch
"
builddir="$srcdir/$pkgname-$_pkgver"
@@ -58,4 +58,4 @@ dev() {
}
sha512sums="a2fd3dd111e73634e4aeb1b29d06e420b15c024d7b47778883b5f8a4ff320b5057a8164c6d50b53bd196c79d572ce2639fe6265e03a93304b09c22b41e4c2a17 libevent-2.1.8-stable.tar.gz
-10abdd9195826739144b2164c2b95a65a7202ed7e1d202ec6f149e286377ee0726f05172ffabcfc6cf83b2832d883bb15632d9323f6907106580989c7af7ee95 libressl.patch"
+8f60b9a0b69ea56f44720bfda81ac31f847e8295a8c1d18a81ebe5bf183b12a638e94d07bfe9d4fbc550e3140eeef9b44d83a0b01f18c5f37f9e7625eefadd0b libressl-2.7.patch"
diff --git a/main/libevent/libressl-2.7.patch b/main/libevent/libressl-2.7.patch
new file mode 100644
index 0000000000..ce0c650b02
--- /dev/null
+++ b/main/libevent/libressl-2.7.patch
@@ -0,0 +1,13 @@
+diff --git a/openssl-compat.h b/openssl-compat.h
+index 69afc71..a6e81ae 100644
+--- a/openssl-compat.h
++++ b/openssl-compat.h
+@@ -31,5 +31,8 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
+ #define TLS_method SSLv23_method
+
+ #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
++#define BIO_get_init(b) (b)->init
++#endif
+
+ #endif /* OPENSSL_COMPAT_H */
diff --git a/main/libevent/libressl.patch b/main/libevent/libressl.patch
deleted file mode 100644
index 21a750c2c3..0000000000
--- a/main/libevent/libressl.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-diff -ru a/openssl-compat.h b/openssl-compat.h
---- a/openssl-compat.h
-+++ b/openssl-compat.h
-@@ -1,7 +1,7 @@
- #ifndef OPENSSL_COMPAT_H
- #define OPENSSL_COMPAT_H
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-
- static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
- {
-@@ -30,6 +30,6 @@
-
- #define TLS_method SSLv23_method
-
--#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
-+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */
-
- #endif /* OPENSSL_COMPAT_H */
-diff -ru a/sample/https-client.c b/sample/https-client.c
---- a/sample/https-client.c
-+++ b/sample/https-client.c
-@@ -312,7 +312,7 @@
- }
- uri[sizeof(uri) - 1] = '\0';
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- // Initialize OpenSSL
- SSL_library_init();
- ERR_load_crypto_strings();
-@@ -480,7 +480,7 @@
- SSL_CTX_free(ssl_ctx);
- if (type == HTTP && ssl)
- SSL_free(ssl);
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- EVP_cleanup();
- ERR_free_strings();
-
-@@ -492,7 +492,7 @@
- CRYPTO_cleanup_all_ex_data();
-
- sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
--#endif /*OPENSSL_VERSION_NUMBER < 0x10100000L */
-+#endif /*OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */
-
- #ifdef _WIN32
- WSACleanup();
-diff -ru a/sample/le-proxy.c b/sample/le-proxy.c
---- a/sample/le-proxy.c
-+++ b/sample/le-proxy.c
-@@ -259,7 +259,7 @@
-
- if (use_ssl) {
- int r;
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- SSL_library_init();
- ERR_load_crypto_strings();
- SSL_load_error_strings();
-diff -ru a/sample/openssl_hostname_validation.c b/sample/openssl_hostname_validation.c
---- a/sample/openssl_hostname_validation.c
-+++ b/sample/openssl_hostname_validation.c
-@@ -48,7 +48,7 @@
-
- #define HOSTNAME_MAX_SIZE 255
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- #define ASN1_STRING_get0_data ASN1_STRING_data
- #endif
-
-diff -ru a/test/regress_ssl.c b/test/regress_ssl.c
---- a/test/regress_ssl.c
-+++ b/test/regress_ssl.c
-@@ -186,7 +186,7 @@
- void
- init_ssl(void)
- {
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- SSL_library_init();
- ERR_load_crypto_strings();
- SSL_load_error_strings();
-@@ -194,6 +194,10 @@
- if (SSLeay() != OPENSSL_VERSION_NUMBER) {
- TT_DECLARE("WARN", ("Version mismatch for openssl: compiled with %lx but running with %lx", (unsigned long)OPENSSL_VERSION_NUMBER, (unsigned long) SSLeay()));
- }
-+ if (SSLeay() != LIBRESSL_VERSION_NUMBER) {
-+ TT_DECLARE("WARN", ("Version mismatch for libressl: compiled with %lx but running with %lx", (unsigned long)LIBRESSL_VERSION_NUMBER, (unsigned long) SSLeay()));
-+ }
-+
- #endif
- }
-