rebuilt with python3 and openssl 1.1 patch [release 2.3.2-2mamba;Fri May 07 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 18:55:01 +01:00
parent e8f0f30a92
commit 87f83d82d3
2 changed files with 132 additions and 14 deletions

View File

@ -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;
}

View File

@ -1,6 +1,6 @@
Name: vde2 Name: vde2
Version: 2.3.2 Version: 2.3.2
Release: 1mamba Release: 2mamba
Summary: An ethernet compliant virtual network that can be spawned over a set of physical computer over the Internet Summary: An ethernet compliant virtual network that can be spawned over a set of physical computer over the Internet
Group: Network/Routing Group: Network/Routing
Vendor: openmamba Vendor: openmamba
@ -8,38 +8,57 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://vde.sourceforge.net/ URL: http://vde.sourceforge.net/
Source: http://downloads.sourceforge.net/project/vde/vde2/%{version}/vde2-%{version}.tar.gz Source: http://downloads.sourceforge.net/project/vde/vde2/%{version}/vde2-%{version}.tar.gz
Patch0: vde2-2.3.2-openssl-1.1.0.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: libpcap-devel BuildRequires: libpcap-devel
BuildRequires: libpython3-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description %description
VDE is an ethernet compliant virtual network that can be spawned over a set of physical computer over the Internet. VDE is part of virtualsquare project. VDE is an ethernet compliant virtual network that can be spawned over a set of physical computer over the Internet. VDE is part of virtualsquare project.
%package devel %package -n lib%{name}
Summary: Shared libraries provided by %{name}
Group: System/Libraries
%description -n lib%{name}
VDE is an ethernet compliant virtual network that can be spawned over a set of physical computer over the Internet. VDE is part of virtualsquare project.
This package contains the shared libraries provided by %{name}.
%package -n lib%{name}-devel
Summary: Devel package for %{name} Summary: Devel package for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Provides: vde2-devel
Obsoletes: vde2-devel <= 2.3.2-1mamba
%description devel %description -n lib%{name}-devel
VDE is an ethernet compliant virtual network that can be spawned over a set of physical computer over the Internet. VDE is part of virtualsquare project. VDE is an ethernet compliant virtual network that can be spawned over a set of physical computer over the Internet. VDE is part of virtualsquare project.
This package contains static libraries and header files needed for development.
This package contains static libraries and header files need for development. %debug_package
%prep %prep
%setup -q %setup -q
%patch0 -p1
%build %build
%configure %configure \
PYTHON=%{__python3}
%make -j1 %make -j1
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall %makeinstall
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -49,17 +68,21 @@ This package contains static libraries and header files need for development.
%{_sysconfdir}/vde2/vdecmd %{_sysconfdir}/vde2/vdecmd
%{_bindir}/* %{_bindir}/*
%{_sbindir}/vde_tunctl %{_sbindir}/vde_tunctl
%{_mandir}/man1/*.1*
%{_mandir}/man8/vde_tunctl.8*
%files -n lib%{name}
%defattr(-,root,root)
%{_libdir}/lib*.so.* %{_libdir}/lib*.so.*
%{_libdir}/vde2
%{_libexecdir}/vdetap %{_libexecdir}/vdetap
%{python_sitearch}/VdePlug.py %dir %{_libdir}/vde2
%{python_sitearch}/vdeplug_python.la %{_libdir}/vde2/*
%{python_sitearch}/vdeplug_python.so %{python3_sitelib}/VdePlug.py
%{_mandir}/man1/*.1.gz %{python3_sitelib}/vdeplug_python.la
%{_mandir}/man8/vde_tunctl.8.gz %{python3_sitelib}/vdeplug_python.so
%doc COPYING %doc COPYING
%files devel %files -n lib%{name}-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir} %dir %{_includedir}
%{_includedir}/*.h %{_includedir}/*.h
@ -70,6 +93,9 @@ This package contains static libraries and header files need for development.
%doc README %doc README
%changelog %changelog
* Fri May 07 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.2-2mamba
- rebuilt with python3 and openssl 1.1 patch
* Thu Jan 10 2013 Automatic Build System <autodist@mambasoft.it> 2.3.2-1mamba * Thu Jan 10 2013 Automatic Build System <autodist@mambasoft.it> 2.3.2-1mamba
- automatic version update by autodist - automatic version update by autodist