diff options
author | Sergej Pupykin | 2017-06-13 15:12:11 +0300 |
---|---|---|
committer | Sergej Pupykin | 2017-06-13 15:12:11 +0300 |
commit | fbc45dd3bb79f6c71f396361b394f216e4be050c (patch) | |
tree | 5949c5b1b5d880bdbcc5ae291c7235a7faaca6ad | |
parent | 71bbe457f777223776589df51fd7da1c64ba5a80 (diff) | |
download | aur-fbc45dd3bb79f6c71f396361b394f216e4be050c.tar.gz |
fix openssl
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | vde_cryptcab-compile-against-openssl-1.1.0.patch | 92 |
3 files changed, 110 insertions, 7 deletions
@@ -1,7 +1,9 @@ +# Generated by mksrcinfo v8 +# Tue Jun 13 12:11:31 UTC 2017 pkgbase = vde2-static pkgdesc = Virtual Distributed Ethernet for emulators like qemu pkgver = 2.3.2 - pkgrel = 5 + pkgrel = 7 url = http://sourceforge.net/projects/vde/ arch = i686 arch = x86_64 @@ -16,7 +18,9 @@ pkgbase = vde2-static options = staticlibs options = !emptydirs source = http://downloads.sourceforge.net/vde/vde2-2.3.2.tar.bz2 - md5sums = 46fbc5f97f03dc517aa3b2c9d9ea6628 + source = vde_cryptcab-compile-against-openssl-1.1.0.patch + sha256sums = cbea9b7e03097f87a6b5e98b07890d2275848f1fe4b9fcda77b8994148bc9542 + sha256sums = 110370a5f48f1e241d43f8bb5e3ea6d2ca7d2c1949e1cf672d03bfc897f2e11f pkgname = vde2-static @@ -4,7 +4,7 @@ pkgname=vde2-static pkgver=2.3.2 -pkgrel=5 +pkgrel=7 pkgdesc="Virtual Distributed Ethernet for emulators like qemu" url="http://sourceforge.net/projects/vde/" license=("GPL" "LGPL" "CUSTOM") @@ -12,18 +12,25 @@ arch=('i686' 'x86_64') depends=('bash' 'libpcap' 'openssl') makedepends=('python') options=(!makeflags 'staticlibs' '!emptydirs') -source=(http://downloads.sourceforge.net/vde/vde2-$pkgver.tar.bz2) -md5sums=('46fbc5f97f03dc517aa3b2c9d9ea6628') +source=(http://downloads.sourceforge.net/vde/vde2-$pkgver.tar.bz2 + vde_cryptcab-compile-against-openssl-1.1.0.patch) +sha256sums=('cbea9b7e03097f87a6b5e98b07890d2275848f1fe4b9fcda77b8994148bc9542' + '110370a5f48f1e241d43f8bb5e3ea6d2ca7d2c1949e1cf672d03bfc897f2e11f') + +prepare() { + cd "$srcdir"/vde2-$pkgver + patch -Np1 -i ../vde_cryptcab-compile-against-openssl-1.1.0.patch +} build() { - cd $srcdir/vde2-$pkgver + cd "$srcdir"/vde2-$pkgver ./configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --libexecdir=/usr/lib/vde2 \ --enable-experimental make } package() { - cd $srcdir/vde2-$pkgver + cd "$srcdir"/vde2-$pkgver make prefix=$pkgdir/usr sysconfdir=$pkgdir/etc sbindir=$pkgdir/usr/bin libexecdir=$pkgdir/usr/lib/vde2 install install -D -m 644 COPYING.slirpvde $pkgdir/usr/share/licenses/$pkgname/COPYING.slirpvde find $pkgdir -type f -or -type l | grep -vE '.a$' | while read a; do rm -f $a; done diff --git a/vde_cryptcab-compile-against-openssl-1.1.0.patch b/vde_cryptcab-compile-against-openssl-1.1.0.patch new file mode 100644 index 000000000000..227312eabbd3 --- /dev/null +++ b/vde_cryptcab-compile-against-openssl-1.1.0.patch @@ -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; + } + |