diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-05 10:05:36 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-07 16:46:14 +0000 |
commit | 13970025c93b23ea19c4c8df3332001b1e0ff5b4 (patch) | |
tree | 3c6eda07524140813654b6a4b91fdce1ae6775f6 /community/xchat | |
parent | 952a9cb21309541f8c5b140470b35125eb2f612e (diff) | |
download | aports-13970025c93b23ea19c4c8df3332001b1e0ff5b4.tar.bz2 aports-13970025c93b23ea19c4c8df3332001b1e0ff5b4.tar.xz |
community/xchat: rebuild against openssl 1.1
Diffstat (limited to 'community/xchat')
-rw-r--r-- | community/xchat/APKBUILD | 36 | ||||
-rw-r--r-- | community/xchat/libressl.patch | 20 | ||||
-rw-r--r-- | community/xchat/xchat-2.8.8-openssl-1.1.0.patch | 100 |
3 files changed, 110 insertions, 46 deletions
diff --git a/community/xchat/APKBUILD b/community/xchat/APKBUILD index 509ef88257..c131e3a955 100644 --- a/community/xchat/APKBUILD +++ b/community/xchat/APKBUILD @@ -1,30 +1,25 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=xchat pkgver=2.8.8 -pkgrel=14 +pkgrel=15 pkgdesc="A GTK+ based IRC client" url="http://www.xchat.org/" arch="all" license="GPL" subpackages="$pkgname-lang" -makedepends="gtk+-dev libressl-dev dbus-glib-dev perl-dev +makedepends="gtk+-dev openssl-dev dbus-glib-dev perl-dev libxext-dev" source="http://www.$pkgname.org/files/source/2.8/$pkgname-$pkgver.tar.bz2 midori.patch xchat-2.8.8-glib-2.31.patch link-gmodule.patch - libressl.patch + xchat-2.8.8-openssl-1.1.0.patch " -_builddir="$srcdir"/$pkgname-$pkgver +builddir="$srcdir"/$pkgname-$pkgver prepare() { - cd "$_builddir" - update_config_sub || return 1 - for i in $source; do - case $i in - *.patch) msg "$i"; patch -p1 -i "$srcdir"/$i || return 1 ;; - esac - done + default_prepare + update_config_sub } build() { @@ -41,28 +36,17 @@ build() { --disable-python \ --enable-ipv6 \ --enable-shm \ - --enable-spell=static \ - || return 1 - make || return 1 + --enable-spell=static + make } package() { cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 + make DESTDIR="$pkgdir" install } -md5sums="6775c44f38e84d06c06c336b32c4a452 xchat-2.8.8.tar.bz2 -759fd786be3a2546be33f7533632b5a2 midori.patch -98f5c7b49a3e0bad4ef0b7871fdcd8b5 xchat-2.8.8-glib-2.31.patch -6efe686e4747e1ea22c368cf83fb6ea2 link-gmodule.patch -03d419af35a860e305dc5a80c2f809ba libressl.patch" -sha256sums="0d6d69437b5e1e45f3e66270fe369344943de8a1190e498fafa5296315a27db0 xchat-2.8.8.tar.bz2 -9a06b649e5ab99428b8e838f8680ad62595c8eb068e37127436eea21998f1af9 midori.patch -8406db6eb273595b6acb4da0ac4befa684f168e1e5c821d48096d508102d7a66 xchat-2.8.8-glib-2.31.patch -332b691c69f6e11fb8fd13fa6328b8cebc64e53063923c406dcf590d964bb1cf link-gmodule.patch -bd16634333265cb4c11dfc43694e9d7f14b669adc10a0fb3adf5421e1c6735f6 libressl.patch" sha512sums="70eddc15a8bb08283b94f4d7bb5225016d42dd7bb946ac30f8e53bb68b892d15dd2a77d8825e5872e47b6d55f15ae468db1a7466676cd548d0a05c571d76db2b xchat-2.8.8.tar.bz2 cff2d877182dc653df6446efe5bd7f7f1365b9b1abaa42c4dc1ab8797ff2366e36878bbc3b3a5e5386da1edfe2339ea304d0b0f55b7ae3bff6120bc39c83dda5 midori.patch b22da471b424b5270733f1c676e46ad411a70d0f14cfa1b42abde270f36c7da8afbeca235e0aa3b504ff35c8177012439e02841e6192fb8947cf0f7c0060e1be xchat-2.8.8-glib-2.31.patch a67671bfd5afa600c7b19f3bce2ba32913f65f115f0beb9397aef28d9941b88d4a9e6fca12a8c78122a5d8379c614f19f7b9e1f4f4384ed2c94594ce0b6c8ade link-gmodule.patch -d2dc08e57c1d9da8487fa8f4e62053b3ff13964e0015860b27bde67a2c1af6e6ad5c7fdd374735145d2b5bb26b4e33e518fbc401c940f7110ec97b1558f99e47 libressl.patch" +9729b6a1b055b17521e7fc483cb5461b54aafeb52a2dd65645f9973db08271a5347a522d1c3cdd7ff7062291f96100474aab0ce6ddf58707219d780a0b745db6 xchat-2.8.8-openssl-1.1.0.patch" diff --git a/community/xchat/libressl.patch b/community/xchat/libressl.patch deleted file mode 100644 index 3a971735dd..0000000000 --- a/community/xchat/libressl.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/common/ssl.c.orig 2016-03-30 20:54:51.193579450 +0200 -+++ b/src/common/ssl.c 2016-03-30 20:55:03.070579987 +0200 -@@ -70,7 +70,7 @@ - - SSLeay_add_ssl_algorithms (); - SSL_load_error_strings (); -- ctx = SSL_CTX_new (server ? SSLv3_server_method() : SSLv3_client_method ()); -+ ctx = SSL_CTX_new (server ? SSLv23_server_method() : SSLv23_client_method ()); - - SSL_CTX_set_session_cache_mode (ctx, SSL_SESS_CACHE_BOTH); - SSL_CTX_set_timeout (ctx, 300); -@@ -281,7 +281,7 @@ - __SSL_critical_error ("SSL_new"); - - SSL_set_fd (ssl, sd); -- if (ctx->method == SSLv3_client_method()) -+ if (ctx->method == SSLv23_client_method()) - SSL_set_connect_state (ssl); - else - SSL_set_accept_state(ssl); diff --git a/community/xchat/xchat-2.8.8-openssl-1.1.0.patch b/community/xchat/xchat-2.8.8-openssl-1.1.0.patch new file mode 100644 index 0000000000..4223b1f299 --- /dev/null +++ b/community/xchat/xchat-2.8.8-openssl-1.1.0.patch @@ -0,0 +1,100 @@ +diff --git a/src/common/server.c b/src/common/server.c +index 87f9f02..96f30ab 100644 +--- a/src/common/server.c ++++ b/src/common/server.c +@@ -593,14 +593,16 @@ ssl_cb_info (SSL * s, int where, int ret) + static int + ssl_cb_verify (int ok, X509_STORE_CTX * ctx) + { ++ X509 *current_cert; + char subject[256]; + char issuer[256]; + char buf[512]; + + +- X509_NAME_oneline (X509_get_subject_name (ctx->current_cert), subject, ++ current_cert = X509_STORE_CTX_get_current_cert (ctx); ++ X509_NAME_oneline (X509_get_subject_name (current_cert), subject, + sizeof (subject)); +- X509_NAME_oneline (X509_get_issuer_name (ctx->current_cert), issuer, ++ X509_NAME_oneline (X509_get_issuer_name (current_cert), issuer, + sizeof (issuer)); + + snprintf (buf, sizeof (buf), "* Subject: %s", subject); +@@ -751,7 +753,12 @@ ssl_do_connect (server * serv) + return (0); /* remove it (0) */ + } else + { +- if (serv->ssl->session && serv->ssl->session->time + SSLTMOUT < time (NULL)) ++ SSL_SESSION *session; ++ long session_time; ++ ++ session = SSL_get_session (serv->ssl); ++ session_time = SSL_SESSION_get_time (session); ++ if (session && session_time + SSLTMOUT < time (NULL)) + { + snprintf (buf, sizeof (buf), "SSL handshake timed out"); + EMIT_SIGNAL (XP_TE_CONNFAIL, serv->server_session, buf, NULL, +diff --git a/src/common/ssl.c b/src/common/ssl.c +index a18ad47..348dbb4 100644 +--- a/src/common/ssl.c ++++ b/src/common/ssl.c +@@ -70,7 +70,7 @@ _SSL_context_init (void (*info_cb_func), int server) + + SSLeay_add_ssl_algorithms (); + SSL_load_error_strings (); +- ctx = SSL_CTX_new (server ? SSLv3_server_method() : SSLv3_client_method ()); ++ ctx = SSL_CTX_new (server ? TLS_server_method() : TLS_client_method ()); + + SSL_CTX_set_session_cache_mode (ctx, SSL_SESS_CACHE_BOTH); + SSL_CTX_set_timeout (ctx, 300); +@@ -136,6 +136,8 @@ int + _SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl) + { + X509 *peer_cert; ++ X509_PUBKEY *peer_pub_key; ++ ASN1_OBJECT *algorithm; + EVP_PKEY *peer_pkey; + /* EVP_PKEY *ca_pkey; */ + /* EVP_PKEY *tmp_pkey; */ +@@ -155,8 +157,10 @@ _SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl) + broke_oneline (cert_info->subject, cert_info->subject_word); + broke_oneline (cert_info->issuer, cert_info->issuer_word); + +- alg = OBJ_obj2nid (peer_cert->cert_info->key->algor->algorithm); +- sign_alg = OBJ_obj2nid (peer_cert->sig_alg->algorithm); ++ peer_pub_key = X509_get_X509_PUBKEY (peer_cert); ++ X509_PUBKEY_get0_param (&algorithm, NULL, NULL, NULL, peer_pub_key); ++ alg = OBJ_obj2nid (algorithm); ++ sign_alg = X509_get_signature_type (peer_cert); + ASN1_TIME_snprintf (notBefore, sizeof (notBefore), + X509_get_notBefore (peer_cert)); + ASN1_TIME_snprintf (notAfter, sizeof (notAfter), +@@ -199,7 +203,7 @@ _SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl) + struct chiper_info * + _SSL_get_cipher_info (SSL * ssl) + { +- SSL_CIPHER *c; ++ const SSL_CIPHER *c; + + + c = SSL_get_current_cipher (ssl); +@@ -274,6 +278,7 @@ SSL * + _SSL_socket (SSL_CTX *ctx, int sd) + { + SSL *ssl; ++ SSL_METHOD *method; + + + if (!(ssl = SSL_new (ctx))) +@@ -281,7 +286,9 @@ _SSL_socket (SSL_CTX *ctx, int sd) + __SSL_critical_error ("SSL_new"); + + SSL_set_fd (ssl, sd); +- if (ctx->method == SSLv3_client_method()) ++ ++ method = SSL_CTX_get_ssl_method (ctx); ++ if (method == SSLv23_client_method()) + SSL_set_connect_state (ssl); + else + SSL_set_accept_state(ssl); |