Date: Monday, March 20, 2017 @ 23:00:38 Author: jgc Revision: 291136 upgpkg: vde2 2.3.2-10
OpenSSL 1.1 Added: vde2/trunk/vde_cryptcab-compile-against-openssl-1.1.0.patch Modified: vde2/trunk/PKGBUILD --------------------------------------------------+ PKGBUILD | 23 +++-- vde_cryptcab-compile-against-openssl-1.1.0.patch | 92 +++++++++++++++++++++ 2 files changed, 107 insertions(+), 8 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-03-20 21:50:14 UTC (rev 291135) +++ PKGBUILD 2017-03-20 23:00:38 UTC (rev 291136) @@ -3,14 +3,15 @@ # Maintainer: Tobias Powalowski <[email protected]> pkgname=vde2 pkgver=2.3.2 -pkgrel=9 +pkgrel=10 pkgdesc="Virtual Distributed Ethernet for emulators like qemu" -url="http://sourceforge.net/projects/vde/" +url="https://sourceforge.net/projects/vde/" license=("GPL" "LGPL" "CUSTOM") arch=('i686' 'x86_64') depends=('bash' 'libpcap' 'openssl') makedepends=('python') -source=(http://downloads.sourceforge.net/vde/$pkgname-$pkgver.tar.bz2 +source=(https://downloads.sourceforge.net/vde/$pkgname-$pkgver.tar.bz2 + vde_cryptcab-compile-against-openssl-1.1.0.patch dhcpd.conf.sample iptables.rules.sample vde-config.sample @@ -17,7 +18,18 @@ vde-connection.sample) install=vde2.install options=(!makeflags) +sha256sums=('cbea9b7e03097f87a6b5e98b07890d2275848f1fe4b9fcda77b8994148bc9542' + '110370a5f48f1e241d43f8bb5e3ea6d2ca7d2c1949e1cf672d03bfc897f2e11f' + 'da0e2766dc63069da929c28126831ad5fdddcc4a04105a21217d78832c7ca1bc' + '99076d7466cd99673dbe91ef83865187e7868177959b38e125df63eea957f83e' + '5727c215646333c37b26388146cd3e6b3814b88d60d54051d7da99e00c0aef87' + '5139110ed6d5d1174bf12971512dac5196d9d07df46dd393d7b1cd083118fe9b') +prepare() { + cd $pkgname-$pkgver + patch -Np1 -i ../vde_cryptcab-compile-against-openssl-1.1.0.patch +} + build() { cd $srcdir/$pkgname-$pkgver ./configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --libexecdir=/usr/lib/vde2 \ @@ -35,8 +47,3 @@ # install slirp license install -D -m 644 COPYING.slirpvde $pkgdir/usr/share/licenses/vde2/COPYING.slirpvde } -md5sums=('46fbc5f97f03dc517aa3b2c9d9ea6628' - '7d9bc56d2e561d849e915000d1c0f269' - 'a920123fc620bcedbccb703a8d1bdc55' - 'f47d3372382dc9d67c1174d2796729fe' - '63033c33565e2030541c5e05e9d9b063') Added: vde_cryptcab-compile-against-openssl-1.1.0.patch =================================================================== --- vde_cryptcab-compile-against-openssl-1.1.0.patch (rev 0) +++ vde_cryptcab-compile-against-openssl-1.1.0.patch 2017-03-20 23:00:38 UTC (rev 291136) @@ -0,0 +1,92 @@ +--- a/src/vde_cryptcab/cryptcab.c 2011-11-23 16:41:17.000000000 +0000 ++++ b/src/vde_cryptcab/cryptcab.c 2017-03-20 22:54:20.452975075 +0000 +@@ -22,7 +22,7 @@ + exit(1); + } + +-static EVP_CIPHER_CTX ctx; ++static EVP_CIPHER_CTX *ctx; + static int ctx_initialized = 0; + static int encryption_disabled = 0; + static int nfd; +@@ -30,6 +30,10 @@ + static struct vde_open_args open_args={.port=0,.group=NULL,.mode=0700}; + static int verbose = 0; + ++#if OPENSSL_VERSION_NUMBER < 0x10100000 ++#define EVP_CIPHER_CTX_reset(x) EVP_CIPHER_CTX_cleanup(x) ++#endif ++ + void vc_printlog(int priority, const char *format, ...) + { + va_list arg; +@@ -103,19 +107,21 @@ + } + + if (!ctx_initialized) { +- EVP_CIPHER_CTX_init (&ctx); ++ ctx = EVP_CIPHER_CTX_new (); ++ if (!ctx) ++ return -1; + ctx_initialized = 1; + } + +- EVP_EncryptInit (&ctx, EVP_bf_cbc (), p->key, p->iv); +- if (EVP_EncryptUpdate (&ctx, dst, &olen, src, len) != 1) ++ EVP_EncryptInit (ctx, EVP_bf_cbc (), p->key, p->iv); ++ if (EVP_EncryptUpdate (ctx, dst, &olen, src, len) != 1) + { + fprintf (stderr,"error in encrypt update\n"); + olen = -1; + goto cleanup; + } + +- if (EVP_EncryptFinal (&ctx, dst + olen, &tlen) != 1) ++ if (EVP_EncryptFinal (ctx, dst + olen, &tlen) != 1) + { + fprintf (stderr,"error in encrypt final\n"); + olen = -1; +@@ -124,7 +130,7 @@ + olen += tlen; + + cleanup: +- EVP_CIPHER_CTX_cleanup(&ctx); ++ EVP_CIPHER_CTX_reset(ctx); + return olen; + } + +@@ -138,19 +144,21 @@ + } + + if (!ctx_initialized) { +- EVP_CIPHER_CTX_init (&ctx); ++ ctx = EVP_CIPHER_CTX_new (); ++ if (!ctx) ++ return -1; + ctx_initialized = 1; + } + +- EVP_DecryptInit (&ctx, EVP_bf_cbc (), p->key, p->iv); +- if (EVP_DecryptUpdate (&ctx, dst, &olen, src, len) != 1) ++ EVP_DecryptInit (ctx, EVP_bf_cbc (), p->key, p->iv); ++ if (EVP_DecryptUpdate (ctx, dst, &olen, src, len) != 1) + { + fprintf (stderr,"error in decrypt update\n"); + olen = -1; + goto cleanup; + } + +- if (EVP_DecryptFinal (&ctx, dst + olen, &tlen) != 1) ++ if (EVP_DecryptFinal (ctx, dst + olen, &tlen) != 1) + { + fprintf (stderr,"error in decrypt final\n"); + olen = -1; +@@ -159,7 +167,7 @@ + olen += tlen; + + cleanup: +- EVP_CIPHER_CTX_cleanup(&ctx); ++ EVP_CIPHER_CTX_reset (ctx); + return olen; + } +
