Commit 7ebbcb3d authored by Francesco Colista's avatar Francesco Colista

main/libshout: upgrade to 2.4.2

parent 710769d5
From 01fafc449f0de56743d08e7976933c49e2915bfa Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
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 <sebastian@breakpoint.cc>
---
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
index aed5bfc..0d55861 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)
@@ -86,14 +86,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;
- SSL_METHOD *meth;
-
+ const 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();
SSL_library_init();
SSL_load_error_strings();
SSLeay_add_all_algorithms();
SSLeay_add_ssl_algorithms();
- meth = TLSv1_client_method();
+ meth = SSLv23_client_method();
+#else
+ meth = TLS_client_method();
- meth = TLSv1_client_method();
+ meth = SSLv23_client_method();
+else
+ meth = TLS_client_method();
+#endif
if (!meth)
goto error;
if (!meth)
goto error;
--
2.15.0
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libshout
pkgver=2.4.1
pkgrel=5
pkgver=2.4.2
pkgrel=0
pkgdesc="Library for accessing a shoutcast/icecast server"
url="http://www.icecast.org/"
arch="all"
options="!check" # No test suite.
license="LGPL-2.1"
depends=
makedepends="speex-dev libtheora-dev libvorbis-dev openssl-dev"
install=""
subpackages="$pkgname-doc $pkgname-dev"
subpackages="$pkgname-static $pkgname-doc $pkgname-dev"
source="http://downloads.xiph.org/releases/$pkgname/$pkgname-$pkgver.tar.gz
01-libshout-tls-compile-with-OpenSSL-1.1.0.patch
"
01-libshout-tls-compile-with-OpenSSL-1.1.0.patch"
build() {
cd "$builddir"
......@@ -25,7 +21,12 @@ build() {
--sysconfdir=/etc \
--localstatedir=/var \
--with-openssl
make LDFLAGS+=-lspeex
make LDFLAGS+=-lspeex
}
check() {
cd "$builddir"
make check
}
package() {
......@@ -33,5 +34,5 @@ package() {
make DESTDIR="$pkgdir" install
}
sha512sums="4d4b958947e020de3330d49d39d59220fc89315f25f653a7456b9aa24ca9566fca30bb3d65e6348e79958656096b6b864ea8885157d24e55c8d84d6604670219 libshout-2.4.1.tar.gz
af27d562fbf4f7be08317a97d69ae27d57618f4e6a5bc0131ce633b46a1a8f3cc24aa21ee12e427994d319e455afd8dbc3d061a6df6814958b9b787cfcb19ed8 01-libshout-tls-compile-with-OpenSSL-1.1.0.patch"
sha512sums="ae4b042009887de22d105eb8238f4362f6ff51bd645fd51b5a87c4b5e3f5fdc99e9f99f85c24ae2e9d23eab92b854a7e733bf9f8cc61a8362ce984f02a014e93 libshout-2.4.2.tar.gz
16534c0e3873075ce628a3cb14d4faf0f25cf0596e7bb1489b0ea6af89900e44cfedf0e06b2f58f1d67950904cd8f9c99fcb9d9b01df009558ed1401e2ab237e 01-libshout-tls-compile-with-OpenSSL-1.1.0.patch"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment