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
|
||||||
6ba9D9hYjs8bF95CsDjBJIsaLyakA4O6kbu/o7xFMZhpMSc1f/K9UxWxUm4wWH7c
|
ajyFWug+mQQ8zw03WGpC1Z6RMeqkh9cuey0SsVWSh//2KJjZt1dqwf90BEj0+LX3
|
||||||
TZwYhfI9kNOL0coA3/k2RZjTOEzS0cglVwr5fAdbxSNRE0v8S+2MvvHSgAaxHVoo
|
PkToX4zAbYGWyzfhRE/DcnIwWHTr/y1ds/wtCh0losi4ZIMHR0p1baHXjUtjsyQe
|
||||||
ujRoRuxk+uXg69aUqYlcuFgyO1fXVLSiE3kEtvW8OSIERFDoTCftH6YNr5LsBWxx
|
82Q3VTcoE8lxKSV97OTbPV+XBAsO/ggJBh2iwerlq65F9XFi8NxDKBIxVvM5Xrdh
|
||||||
i8kVxebQ5kL20tE1Pg49SuapGqDA6/zqd8Bkw3xpsuqtbCXf9Vq7pGeeE91O/pJw
|
IaZcfOsFMfO0z6m0k35QpgROCRDj1PLBSM4/IGF5HovMTNlCs59iArWbnNdiMrWq
|
||||||
9DjK+X1famRU+qxQkaI4B5joeHa+BTAIhmepXGD2z/fZukIjYqCjUvS2do40A3/N
|
Ie98YUcFbpySCLRR0lTfZIpHokeMNq7l5u0TGDvKvPBIRAdrHLT/rrqKAVvXKBXo
|
||||||
I2daZmHsAYlokHM5SM4a0A==
|
YUuGTiwpP9rwu3teCowB6A==
|
||||||
=Tm+E
|
=uUtv
|
||||||
-----END PGP SIGNATURE-----
|
-----END PGP SIGNATURE-----
|
||||||
|
Binary file not shown.
@ -1,17 +1,17 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
iQJNBAABCgA3FiEEm8dazQnvu0U1Gdmc9s+lqZ57WVcFAmCW5HkZHGd6YW11ZGlv
|
iQJNBAABCgA3FiEEm8dazQnvu0U1Gdmc9s+lqZ57WVcFAmCW5agZHGd6YW11ZGlv
|
||||||
QGxpYnJlbWV4Lm9yZy5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M4f8sIhomvROJbv7nCTPnLoZwyGIqzHrExkfQ7GqG8R50RMbvVRQinC82si0xqK3
|
/7GsX/55+UavFRyeOgLYeJZPKjcKPb+gcs5XgRaYDD2gRHqIrfjzeyPw64aay2w/
|
||||||
OhqfF13LZV4RaUll7D6FfhF0ssWwcyJu0Vf5JgDOUjsVRDUrPrxsPrOmiUoajwdS
|
07Noz6FHk7GPn1MxHwyd5ZgELWHO8DWaHFYKPsAcFpxH9Oe7SvsWR6/4kR31HuQE
|
||||||
N9iecR5KNCWj5RrAirpQ4HJeSopH9QjKl7QArGllHiXayyvhZlWGT/REbnksBIB+
|
L6oRwuCasMWTDMWjpbcDBgGSXk23UK+iSDYMQN/WLy2fjrJuCr5wTqkyF+EWavIe
|
||||||
RCFDWPDPzO2ngV/egeFFig==
|
50oJZes2AiE+SRFJpklPIg==
|
||||||
=muvK
|
=NG21
|
||||||
-----END PGP SIGNATURE-----
|
-----END PGP SIGNATURE-----
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,19 @@
|
|||||||
|
# HOW TO EDIT THIS FILE:
|
||||||
|
# The "handy ruler" below makes it easier to edit a package description.
|
||||||
|
# Line up the first '|' above the ':' following the base package name, and
|
||||||
|
# the '|' on the right side marks the last column you can put a character in.
|
||||||
|
# You must make exactly 11 lines for the formatting to be correct. It's also
|
||||||
|
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||||
|
|
||||||
|
|-----handy-ruler------------------------------------------------------|
|
||||||
|
vde2: vde2 (Virtual Distributed Ethernet)
|
||||||
|
vde2:
|
||||||
|
vde2: VDE is an ethernet compliant virtual network which includes tools such
|
||||||
|
vde2: as 'vde_switch' and 'vdeqemu'. VDE switch has several virtual ports
|
||||||
|
vde2: where virtual machines, applications, virtual interfaces and
|
||||||
|
vde2: connectivity tools can be virtually plugged in. VDE qemu works as a
|
||||||
|
vde2: wrapper for running qemu/kvm virtual machines that connects
|
||||||
|
vde2: transparently to a specified vde_switch
|
||||||
|
vde2:
|
||||||
|
vde2: Homepage: http://vde.sourceforge.net
|
||||||
|
vde2:
|
@ -0,0 +1,19 @@
|
|||||||
|
# HOW TO EDIT THIS FILE:
|
||||||
|
# The "handy ruler" below makes it easier to edit a package description.
|
||||||
|
# Line up the first '|' above the ':' following the base package name, and
|
||||||
|
# the '|' on the right side marks the last column you can put a character in.
|
||||||
|
# You must make exactly 11 lines for the formatting to be correct. It's also
|
||||||
|
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||||
|
|
||||||
|
|-----handy-ruler------------------------------------------------------|
|
||||||
|
vde2: vde2 (Virtual Distributed Ethernet)
|
||||||
|
vde2:
|
||||||
|
vde2: VDE is an ethernet compliant virtual network which includes tools such
|
||||||
|
vde2: as 'vde_switch' and 'vdeqemu'. VDE switch has several virtual ports
|
||||||
|
vde2: where virtual machines, applications, virtual interfaces and
|
||||||
|
vde2: connectivity tools can be virtually plugged in. VDE qemu works as a
|
||||||
|
vde2: wrapper for running qemu/kvm virtual machines that connects
|
||||||
|
vde2: transparently to a specified vde_switch
|
||||||
|
vde2:
|
||||||
|
vde2: Homepage: http://vde.sourceforge.net
|
||||||
|
vde2:
|
@ -0,0 +1,52 @@
|
|||||||
|
VDE is an ethernet compliant virtual network which includes tools such
|
||||||
|
as 'vde_switch' and 'vdeqemu'. VDE switch has several virtual ports
|
||||||
|
where virtual machines, applications, virtual interfaces and
|
||||||
|
connectivity tools can be virtually plugged in. VDE qemu works as a
|
||||||
|
wrapper for running qemu virtual machines that connects transparently
|
||||||
|
to a specified vde_switch
|
||||||
|
|
||||||
|
VDE is dependant upon TUN/TAP support in the Linux Kernel; this comes
|
||||||
|
enabled by default with Slackware 13's 'generic' kernel. To enable
|
||||||
|
TUN/TAP support manually, you must set the following entry in your
|
||||||
|
kernel's '.config' file and recompile:
|
||||||
|
CONFIG_TUN=m
|
||||||
|
|
||||||
|
## Experimental features
|
||||||
|
If you know/want vde2's experimental features, execute the script as:
|
||||||
|
EXPERIMENTAL=true sh vde2.SlackBuild
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
An init script has been provided in /etc/rc.d/rc.vde2 to use with
|
||||||
|
vde_switch. Edit this script and provide the TAP inteface name as
|
||||||
|
well as the subnet for your Virtual Switch to use. Do NOT choose
|
||||||
|
a subnet which is already in use. More than likely, the default
|
||||||
|
values will work fine.
|
||||||
|
|
||||||
|
## VDE + Qemu/kvm
|
||||||
|
A common usage for vde_switch is to be able to have emulated OS's
|
||||||
|
via Qemu behave as if they were actually attached to a Local Network.
|
||||||
|
To enable this functionality with Qemu, replace any calls to 'qemu'
|
||||||
|
with the following command:
|
||||||
|
|
||||||
|
vdeqemu -net vde,vlan=0 -net nic,vlan=0,macaddr=AA:BB:CC:DD:EE:FF
|
||||||
|
|
||||||
|
Note that the 'macaddr' string is optional but can prove to be
|
||||||
|
quite useful when used in conjuction with a DHCP server (such as
|
||||||
|
dhcpd or dnsmasq) to assign IP's based upon MAC address.
|
||||||
|
|
||||||
|
Do not forget to include the options which point vdeqemu to your
|
||||||
|
ISO image to boot along with any other options you may have used
|
||||||
|
with 'qemu' such as -localtime, -nographic etc.
|
||||||
|
|
||||||
|
## Startup
|
||||||
|
To have this start upon each boot, add the following lines to
|
||||||
|
/etc/rc.d/rc.local and make sure rc.vde2 is executable.
|
||||||
|
|
||||||
|
# Start vde_switch
|
||||||
|
if [ -x /etc/rc.d/rc.vde2 ]; then
|
||||||
|
/etc/rc.d/rc.vde2 start
|
||||||
|
fi
|
||||||
|
|
||||||
|
## For more information you can check:
|
||||||
|
http://wiki.virtualsquare.org
|
||||||
|
http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:vde&s=qemu
|
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
config() {
|
||||||
|
NEW="$1"
|
||||||
|
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||||
|
# If there's no config file by that name, mv it over:
|
||||||
|
if [ ! -r $OLD ]; then
|
||||||
|
mv $NEW $OLD
|
||||||
|
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||||
|
# toss the redundant copy
|
||||||
|
rm $NEW
|
||||||
|
fi
|
||||||
|
# Otherwise, we leave the .new copy for the admin to consider...
|
||||||
|
}
|
||||||
|
|
||||||
|
# Keep same perms on rc.vde2.new:
|
||||||
|
if [ -e etc/rc.d/rc.vde2 ]; then
|
||||||
|
cp -a etc/rc.d/rc.vde2 etc/rc.d/rc.vde2.new.incoming
|
||||||
|
cat etc/rc.d/rc.vde2.new > etc/rc.d/rc.vde2.new.incoming
|
||||||
|
mv etc/rc.d/rc.vde2.new.incoming etc/rc.d/rc.vde2.new
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,74 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#=========================== EDIT THE FOLLOWING VARIABLES ==========================
|
||||||
|
# _________________________________________________________________________________
|
||||||
|
# | |
|
||||||
|
# | Interface name to use for the TAP device |
|
||||||
|
# | |
|
||||||
|
TAP_IF="tap0"
|
||||||
|
# |_________________________________________________________________________________|
|
||||||
|
# | |
|
||||||
|
# | IP Address/Subnet in CIDR Notation for the Virtual Network |
|
||||||
|
# | |
|
||||||
|
TAP_NET="10.10.10.1/24"
|
||||||
|
# |_________________________________________________________________________________|
|
||||||
|
#
|
||||||
|
#=========================== DO NOT EDIT BELOW THIS LINE ============================
|
||||||
|
|
||||||
|
start(){
|
||||||
|
echo -n "Starting VDE Switch..."
|
||||||
|
|
||||||
|
# Load tun module
|
||||||
|
modprobe tun || { echo "Error, cannot load 'tun' module. Exiting..." ; exit 1 ; }
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
# Start tap switch
|
||||||
|
vde_switch -tap ${TAP_IF} -daemon || { echo "Error, cannot assign IP to ${TAP_IF}. Exiting..." ; exit 1 ; }
|
||||||
|
|
||||||
|
# Bring tap interface up
|
||||||
|
ip addr add ${TAP_NET} dev ${TAP_IF}
|
||||||
|
ip link set ${TAP_IF} up
|
||||||
|
|
||||||
|
#chmod 666 /tmp/vde.ctl
|
||||||
|
chmod -R a+rwx /var/run/vde.ctl
|
||||||
|
|
||||||
|
# Apply workaround
|
||||||
|
echo 1024 > /proc/sys/dev/rtc/max-user-freq
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
stop(){
|
||||||
|
echo -n "Stopping VDE Switch..."
|
||||||
|
|
||||||
|
# Bring tap interface down
|
||||||
|
ip addr flush dev ${TAP_IF}
|
||||||
|
ip link set ${TAP_IF} down
|
||||||
|
|
||||||
|
# Kill VDE switch
|
||||||
|
kill $(pgrep vde_switch)
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
# Remove tun module
|
||||||
|
modprobe -r tun
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
|
||||||
|
restart)
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart}"
|
||||||
|
;;
|
||||||
|
esac
|
@ -0,0 +1,19 @@
|
|||||||
|
# HOW TO EDIT THIS FILE:
|
||||||
|
# The "handy ruler" below makes it easier to edit a package description.
|
||||||
|
# Line up the first '|' above the ':' following the base package name, and
|
||||||
|
# the '|' on the right side marks the last column you can put a character in.
|
||||||
|
# You must make exactly 11 lines for the formatting to be correct. It's also
|
||||||
|
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||||
|
|
||||||
|
|-----handy-ruler------------------------------------------------------|
|
||||||
|
vde2: vde2 (Virtual Distributed Ethernet)
|
||||||
|
vde2:
|
||||||
|
vde2: VDE is an ethernet compliant virtual network which includes tools such
|
||||||
|
vde2: as 'vde_switch' and 'vdeqemu'. VDE switch has several virtual ports
|
||||||
|
vde2: where virtual machines, applications, virtual interfaces and
|
||||||
|
vde2: connectivity tools can be virtually plugged in. VDE qemu works as a
|
||||||
|
vde2: wrapper for running qemu/kvm virtual machines that connects
|
||||||
|
vde2: transparently to a specified vde_switch
|
||||||
|
vde2:
|
||||||
|
vde2: Homepage: http://vde.sourceforge.net
|
||||||
|
vde2:
|
@ -0,0 +1,136 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Slackware build script for vde2
|
||||||
|
|
||||||
|
# Copyright 2007-2008 Sean Donner (sean.donner@sbcglobal.net)
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use of this script, with or without modification, is
|
||||||
|
# permitted provided that the following conditions are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of this script must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||||
|
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||||
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
# Modified by Antonio Hernández Blas <hba.nihilismus@gmail.com>
|
||||||
|
|
||||||
|
PRGNAM=vde2
|
||||||
|
VERSION=${VERSION:-2.3.2}
|
||||||
|
BUILD=${BUILD:-1}
|
||||||
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
|
if [ -z "$ARCH" ]; then
|
||||||
|
case "$( uname -m )" in
|
||||||
|
i?86) ARCH=i586 ;;
|
||||||
|
arm*) ARCH=arm ;;
|
||||||
|
*) ARCH=$( uname -m ) ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
CWD=$(pwd)
|
||||||
|
TMP=${TMP:-/tmp/SBo}
|
||||||
|
PKG=$TMP/package-$PRGNAM
|
||||||
|
OUTPUT=${OUTPUT:-/tmp}
|
||||||
|
|
||||||
|
if [ "$ARCH" = "i586" ]; then
|
||||||
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||||
|
LIBDIRSUFFIX=""
|
||||||
|
elif [ "$ARCH" = "i686" ]; then
|
||||||
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||||
|
LIBDIRSUFFIX=""
|
||||||
|
elif [ "$ARCH" = "x86_64" ]; then
|
||||||
|
SLKCFLAGS="-O2 -fPIC"
|
||||||
|
LIBDIRSUFFIX="64"
|
||||||
|
else
|
||||||
|
SLKCFLAGS="-O2"
|
||||||
|
LIBDIRSUFFIX=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
rm -rf $PKG
|
||||||
|
mkdir -p $TMP $PKG $OUTPUT
|
||||||
|
cd $TMP
|
||||||
|
rm -rf $PRGNAM-$VERSION
|
||||||
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
|
||||||
|
cd $PRGNAM-$VERSION
|
||||||
|
chown -R root:root .
|
||||||
|
find -L . \
|
||||||
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||||
|
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||||
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||||
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||||
|
|
||||||
|
# Patch to build against openssl-1.1.x - thanks archlinux!
|
||||||
|
patch -p1 < $CWD/vde_cryptcab-compile-against-openssl-1.1.0.patch
|
||||||
|
|
||||||
|
EXPERIMENTAL=${EXPERIMENTAL:-false}
|
||||||
|
OPTIONS=""
|
||||||
|
|
||||||
|
if [ "$EXPERIMENTAL" = "true" ]; then
|
||||||
|
OPTIONS+="--enable-experimental"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This seems like a not yet implemented feature so this is just
|
||||||
|
# a reminder:
|
||||||
|
# --enable-kernel-switch
|
||||||
|
|
||||||
|
CFLAGS="$SLKCFLAGS" \
|
||||||
|
CXXFLAGS="$SLKCFLAGS" \
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--localstatedir=/var \
|
||||||
|
--datarootdir=/usr \
|
||||||
|
--datadir=/usr/share \
|
||||||
|
--enable-shared=yes \
|
||||||
|
--disable-static \
|
||||||
|
$OPTIONS \
|
||||||
|
--build=$ARCH-slackware-linux
|
||||||
|
|
||||||
|
make -j1 all
|
||||||
|
make install-strip DESTDIR=$PKG
|
||||||
|
|
||||||
|
( cd $PKG/usr/man
|
||||||
|
find . -type f -exec gzip -9 {} \;
|
||||||
|
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||||
|
)
|
||||||
|
|
||||||
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
|
cp -a COPYING* INSTALL README* doc \
|
||||||
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
|
rm -f $PKG/usr/doc/$PRGNAM-$VERSION/doc/Makefile*
|
||||||
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
|
||||||
|
mkdir -p $PKG/etc/rc.d
|
||||||
|
install -m 0755 $CWD/rc.vde2 $PKG/etc/rc.d/rc.vde2
|
||||||
|
|
||||||
|
mkdir -p $PKG/install
|
||||||
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||||
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||||
|
|
||||||
|
# Add .new extension to all configuration files.
|
||||||
|
for file in $(find $PKG/etc -type f)
|
||||||
|
do
|
||||||
|
mv $file $file.new
|
||||||
|
done
|
||||||
|
|
||||||
|
# Add *.new files into doinst.sh
|
||||||
|
for file in $(find $PKG/etc -type f -name "*.new")
|
||||||
|
do
|
||||||
|
echo config $(echo $file | sed "s:$PKG/::") >> $PKG/install/doinst.sh
|
||||||
|
done
|
||||||
|
|
||||||
|
cd $PKG
|
||||||
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
@ -0,0 +1,10 @@
|
|||||||
|
PRGNAM="vde2"
|
||||||
|
VERSION="2.3.2"
|
||||||
|
HOMEPAGE="http://vde.sourceforge.net"
|
||||||
|
DOWNLOAD="http://downloads.sourceforge.net/project/vde/vde2/2.3.2/vde2-2.3.2.tar.bz2"
|
||||||
|
MD5SUM="46fbc5f97f03dc517aa3b2c9d9ea6628"
|
||||||
|
DOWNLOAD_x86_64=""
|
||||||
|
MD5SUM_x86_64=""
|
||||||
|
REQUIRES=""
|
||||||
|
MAINTAINER="Mikko Värri"
|
||||||
|
EMAIL="vmj@linuxbox.fi"
|
@ -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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in new issue