Hello community,

here is the log from the commit of package vde2 for openSUSE:Factory checked in 
at 2017-09-15 21:02:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vde2 (Old)
 and      /work/SRC/openSUSE:Factory/.vde2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "vde2"

Fri Sep 15 21:02:00 2017 rev:12 rq:523057 version:2.3.2+svn587

Changes:
--------
--- /work/SRC/openSUSE:Factory/vde2/vde2.changes        2017-08-24 
18:20:20.392354364 +0200
+++ /work/SRC/openSUSE:Factory/.vde2.new/vde2.changes   2017-09-15 
21:02:01.381893484 +0200
@@ -1,0 +2,6 @@
+Mon Sep 11 10:50:57 UTC 2017 - [email protected]
+
+- Patch for openssl 1.1 compatibility
+  * add vde2-openssl_1.1_compatibility.patch from Debian
+
+-------------------------------------------------------------------

New:
----
  vde2-openssl_1.1_compatibility.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ vde2.spec ++++++
--- /var/tmp/diff_new_pack.nLqaC3/_old  2017-09-15 21:02:02.061798045 +0200
+++ /var/tmp/diff_new_pack.nLqaC3/_new  2017-09-15 21:02:02.061798045 +0200
@@ -24,8 +24,10 @@
 Group:          Productivity/Networking/Other
 Url:            http://vde.sourceforge.net/
 Source0:        %{name}-%{version}.tar.xz
-# PATCH-FIX-UPSTREAM: always overlfows destination buffer
+# PATCH-FIX-UPSTREAM: always overflows destination buffer
 Patch0:         vde2-buffer-overflow.patch
+# PATCH-FIX-UPSTREAM: openssl 1.1 compatibility
+Patch1:         vde2-openssl_1.1_compatibility.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  gcc-c++
@@ -170,6 +172,7 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 autoreconf -fvi

++++++ vde2-openssl_1.1_compatibility.patch ++++++
## Description: add some description
## Origin/Author: add some origin or author
## Bug: bug URL
>From 5f2c4c7b67617991af65798a4d177ada90f7e463 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <[email protected]>
Date: Fri, 2 Sep 2016 19:52:49 +0000
Subject: [PATCH] vde_cryptcab: compile against openssl 1.1.0

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
---
 src/vde_cryptcab/cryptcab.c | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

Index: vde2-2.3.2+svn587/src/vde_cryptcab/cryptcab.c
===================================================================
--- vde2-2.3.2+svn587.orig/src/vde_cryptcab/cryptcab.c  2014-11-12 
15:23:16.000000000 +0100
+++ vde2-2.3.2+svn587/src/vde_cryptcab/cryptcab.c       2017-09-11 
12:55:15.457196155 +0200
@@ -22,7 +22,7 @@ static void Usage(char *programname)
        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 unsigned long long mycounter=1;
 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;
@@ -105,19 +109,21 @@ int data_encrypt(unsigned char *src, uns
        }
 
        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 + ulen, &tlen) != 1)
+       if (EVP_EncryptFinal (ctx, dst + ulen, &tlen) != 1)
        {
                fprintf (stderr,"error in encrypt final\n");
                olen = -1;
@@ -126,7 +132,7 @@ int data_encrypt(unsigned char *src, uns
        olen += tlen;
 
 cleanup:
-       EVP_CIPHER_CTX_cleanup(&ctx);   
+       EVP_CIPHER_CTX_reset(ctx);
        return olen;
 }
 
@@ -142,19 +148,21 @@ int data_decrypt(unsigned char *src, uns
        }
        
        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, ulen) != 1)
+       EVP_DecryptInit (ctx, EVP_bf_cbc (), p->key, p->iv);
+       if (EVP_DecryptUpdate (ctx, dst, &olen, src, ulen) != 1)
        {
                fprintf (stderr,"error in decrypt update\n");
                olen = -1;
                goto cleanup;
        }
 
-       if (EVP_DecryptFinal (&ctx, dst + ulen, &tlen) != 1)
+       if (EVP_DecryptFinal (ctx, dst + ulen, &tlen) != 1)
        {
                fprintf (stderr,"error in decrypt final, ulen = %d, tlen = 
%d\n", ulen, tlen);
                olen = -1;
@@ -163,7 +171,7 @@ int data_decrypt(unsigned char *src, uns
        olen += tlen;
 
 cleanup:
-       EVP_CIPHER_CTX_cleanup(&ctx);   
+       EVP_CIPHER_CTX_reset (ctx);
        return olen;
 }
 

Reply via email to