summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD38
-rw-r--r--openssl110.patch95
3 files changed, 152 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..34afd78c5a2f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = lib32-libexosip2
+ pkgdesc = A library that hides the complexity of using SIP for multimedia session establishement
+ pkgver = 5.0.0
+ pkgrel = 1
+ url = https://savannah.nongnu.org/projects/exosip/
+ arch = x86_64
+ license = GPL
+ depends = lib32-glibc
+ depends = lib32-gcc-libs
+ depends = lib32-libosip2>=4.0.0
+ depends = lib32-openssl
+ source = https://download.savannah.gnu.org/releases/exosip/libexosip2-5.0.0.tar.gz
+ source = openssl110.patch
+ validpgpkeys = 34C3985D068879312FE23C8BB5902A3AD90A5421
+ sha256sums = a26558594de95405d3adeee554a7c10cb3ec5a9316a879e679b53a99a9cf2e1f
+ sha256sums = e60ef8fe99e7aa8641398a70708ab1e4f85d04872f1c658949afc4fd657c4d5a
+
+pkgname = lib32-libexosip2
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..85c013ccd993
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Andrew Sun <adsun701@gmail.com>
+
+pkgname=lib32-libexosip2
+pkgver=5.0.0
+pkgrel=1
+pkgdesc="A library that hides the complexity of using SIP for multimedia session establishement"
+arch=('x86_64')
+url="https://savannah.nongnu.org/projects/exosip/"
+license=('GPL')
+depends=('lib32-glibc' 'lib32-gcc-libs' 'lib32-libosip2>=4.0.0' 'lib32-openssl')
+validpgpkeys=('34C3985D068879312FE23C8BB5902A3AD90A5421')
+source=(https://download.savannah.gnu.org/releases/exosip/libexosip2-${pkgver}.tar.gz
+ openssl110.patch)
+sha256sums=('a26558594de95405d3adeee554a7c10cb3ec5a9316a879e679b53a99a9cf2e1f'
+ 'e60ef8fe99e7aa8641398a70708ab1e4f85d04872f1c658949afc4fd657c4d5a')
+
+prepare() {
+ cd "${srcdir}/libexosip2-${pkgver}"
+ patch -Np1 -i "${srcdir}/openssl110.patch"
+}
+
+build() {
+ cd "${srcdir}/libexosip2-${pkgver}"
+
+ export CC='gcc -m32'
+ export CXX='g++ -m32'
+ export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
+
+ ./configure --prefix=/usr --libdir=/usr/lib32
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make
+}
+
+package() {
+ cd "${srcdir}/libexosip2-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ rm -rf "${pkgdir}"/usr/{bin,include,share}
+}
diff --git a/openssl110.patch b/openssl110.patch
new file mode 100644
index 000000000000..b224d61a015e
--- /dev/null
+++ b/openssl110.patch
@@ -0,0 +1,95 @@
+## Description: add some description
+## Origin/Author: add some origin or author
+## Bug: bug URL
+diff -urip libexosip2-4.1.0/src/eXtl_dtls.c libexosip2-4.1.0.openssl110/src/eXtl_dtls.c
+--- libexosip2-4.1.0/src/eXtl_dtls.c 2014-01-06 19:30:21.000000000 +0100
++++ libexosip2-4.1.0.openssl110/src/eXtl_dtls.c 2016-11-07 20:23:01.503943171 +0100
+@@ -233,7 +233,7 @@ shutdown_free_client_dtls (struct eXosip
+
+ BIO_ctrl (rbio, BIO_CTRL_DGRAM_SET_PEER, 0, (char *) &addr);
+
+- (reserved->socket_tab[pos].ssl_conn)->rbio = rbio;
++ SSL_set0_rbio((reserved->socket_tab[pos].ssl_conn), rbio);
+
+ i = SSL_shutdown (reserved->socket_tab[pos].ssl_conn);
+
+@@ -588,12 +588,11 @@ dtls_tl_read_message (struct eXosip_t *e
+ rbio = BIO_new_mem_buf (enc_buf, enc_buf_len);
+ BIO_set_mem_eof_return (rbio, -1);
+
+- reserved->socket_tab[pos].ssl_conn->rbio = rbio;
++ SSL_set0_rbio(reserved->socket_tab[pos].ssl_conn, rbio);
+
+ i = SSL_read (reserved->socket_tab[pos].ssl_conn, dec_buf, SIP_MESSAGE_MAX_LENGTH);
+ /* done with the rbio */
+- BIO_free (reserved->socket_tab[pos].ssl_conn->rbio);
+- reserved->socket_tab[pos].ssl_conn->rbio = BIO_new (BIO_s_mem ());
++ SSL_set0_rbio(reserved->socket_tab[pos].ssl_conn, BIO_new (BIO_s_mem ()));
+
+ if (i > 5) {
+ dec_buf[i] = '\0';
+@@ -904,7 +903,7 @@ dtls_tl_send_message (struct eXosip_t *e
+ _dtls_stream_used = &reserved->socket_tab[pos];
+ rbio = BIO_new_dgram (reserved->dtls_socket, BIO_NOCLOSE);
+ BIO_ctrl (rbio, BIO_CTRL_DGRAM_SET_PEER, 0, (char *) &addr);
+- reserved->socket_tab[pos].ssl_conn->rbio = rbio;
++ SSL_set0_rbio(reserved->socket_tab[pos].ssl_conn, rbio);
+ break;
+ }
+ }
+@@ -918,7 +917,7 @@ dtls_tl_send_message (struct eXosip_t *e
+ _dtls_stream_used = &reserved->socket_tab[pos];
+ rbio = BIO_new_dgram (reserved->dtls_socket, BIO_NOCLOSE);
+ BIO_ctrl (rbio, BIO_CTRL_DGRAM_SET_PEER, 0, (char *) &addr);
+- reserved->socket_tab[pos].ssl_conn->rbio = rbio;
++ SSL_set0_rbio(reserved->socket_tab[pos].ssl_conn, rbio);
+ break;
+ }
+ }
+diff -urip libexosip2-4.1.0/src/eXtl_tls.c libexosip2-4.1.0.openssl110/src/eXtl_tls.c
+--- libexosip2-4.1.0/src/eXtl_tls.c 2014-01-06 19:30:21.000000000 +0100
++++ libexosip2-4.1.0.openssl110/src/eXtl_tls.c 2016-11-07 20:27:51.568892332 +0100
+@@ -838,7 +838,7 @@ verify_cb (int preverify_ok, X509_STORE_
+ * it for something special
+ */
+ if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT)) {
+- X509_NAME_oneline (X509_get_issuer_name (store->current_cert), buf, 256);
++ X509_NAME_oneline (X509_get_issuer_name (X509_STORE_CTX_get_current_cert(store)), buf, 256);
+ OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "issuer= %s\n", buf));
+ }
+
+@@ -1155,7 +1155,7 @@ initialize_client_ctx (struct eXosip_t *
+ }
+ else {
+ /* this is used to add a trusted certificate */
+- X509_STORE_add_cert (ctx->cert_store, cert);
++ X509_STORE_add_cert (SSL_CTX_get_cert_store(ctx), cert);
+ }
+ BIO_free (bio);
+ }
+@@ -1231,16 +1231,21 @@
+ if (excontext->tls_verify_client_certificate > 0 && sni_servernameindication!=NULL) {
+ X509_STORE *pkix_validation_store = SSL_CTX_get_cert_store (ctx);
+ const X509_VERIFY_PARAM *param = X509_VERIFY_PARAM_lookup ("ssl_server");
++#if (OPENSSL_VERSION_NUMBER > 0x10001000L)
++ X509_VERIFY_PARAM *store_param = X509_STORE_get0_param(pkix_validation_store);
++#else
++ X509_VERIFY_PARAM *store_param = pkix_validation_store->param;
++#endif
+
+ if (param != NULL) { /* const value, we have to copy (inherit) */
+- if (X509_VERIFY_PARAM_inherit (pkix_validation_store->param, param)) {
++ if (X509_VERIFY_PARAM_inherit (store_param, param)) {
+ X509_STORE_set_flags (pkix_validation_store, X509_V_FLAG_TRUSTED_FIRST);
+ X509_STORE_set_flags (pkix_validation_store, X509_V_FLAG_PARTIAL_CHAIN);
+ } else {
+ OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "PARAM_inherit: failed for ssl_server\n"));
+ }
+- if (X509_VERIFY_PARAM_set1_host (pkix_validation_store->param, sni_servernameindication, 0)) {
+- X509_VERIFY_PARAM_set_hostflags (pkix_validation_store->param, X509_CHECK_FLAG_NO_WILDCARDS);
++ if (X509_VERIFY_PARAM_set1_host (store_param, sni_servernameindication, 0)) {
++ X509_VERIFY_PARAM_set_hostflags (store_param, X509_CHECK_FLAG_NO_WILDCARDS);
+ } else {
+ OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "PARAM_set1_host: %s failed\n", sni_servernameindication));
+ }
+