Control: tags 828469 + patch
Control: tags 828469 + pending
Dear maintainer,
I've prepared an NMU for openipmi (versioned as 2.0.22-1.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.
Regards.
Sebastian
diff -Nru openipmi-2.0.22/debian/changelog openipmi-2.0.22/debian/changelog
--- openipmi-2.0.22/debian/changelog 2016-07-03 20:09:46.0 +0200
+++ openipmi-2.0.22/debian/changelog 2016-12-14 22:19:50.0 +0100
@@ -1,3 +1,10 @@
+openipmi (2.0.22-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add OpenSSL 1.1.0 support (Closes: #828469).
+
+ -- Sebastian Andrzej Siewior Wed, 14 Dec 2016 22:19:50 +0100
+
openipmi (2.0.22-1) unstable; urgency=medium
* new upstream release from 2016-06-01
diff -Nru openipmi-2.0.22/debian/patches/0001-Add-openssl-1.1.0-support.patch openipmi-2.0.22/debian/patches/0001-Add-openssl-1.1.0-support.patch
--- openipmi-2.0.22/debian/patches/0001-Add-openssl-1.1.0-support.patch 1970-01-01 01:00:00.0 +0100
+++ openipmi-2.0.22/debian/patches/0001-Add-openssl-1.1.0-support.patch 2016-12-14 22:12:49.0 +0100
@@ -0,0 +1,184 @@
+From eeacbf0c675b61881fc00539cb365de084950ceb Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior
+Date: Sun, 25 Sep 2016 23:45:12 +0200
+Subject: [PATCH] Add openssl 1.1.0 support
+
+while keeping work under openssl 1.0.2.
+
+Signed-off-by: Sebastian Andrzej Siewior
+Signed-off-by: Corey Minyard
+---
+ lanserv/lanserv_ipmi.c | 34 +-
+ lib/aes_cbc.c | 34 +-
+ 2 files changed, 42 insertions(+), 26 deletions(-)
+
+diff --git a/lanserv/lanserv_ipmi.c b/lanserv/lanserv_ipmi.c
+index b0a2431f1322..67bf74a5e697 100644
+--- a/lanserv/lanserv_ipmi.c
b/lanserv/lanserv_ipmi.c
+@@ -2217,7 +2217,7 @@ aes_cbc_encrypt(lanserv_data_t *lan, session_t *session,
+ unsigned char *d;
+ unsigned char *iv;
+ unsigned int i;
+-EVP_CIPHER_CTX ctx;
++EVP_CIPHER_CTX *ctx;
+ intrv;
+ intoutlen;
+ inttmplen;
+@@ -2264,14 +2264,18 @@ aes_cbc_encrypt(lanserv_data_t *lan, session_t *session,
+ *data_size += 16;
+
+ /* Ok, we're set to do the crypt operation. */
+-EVP_CIPHER_CTX_init(&ctx);
+-EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, a->ckey, iv);
+-EVP_CIPHER_CTX_set_padding(&ctx, 0);
+-if (!EVP_EncryptUpdate(&ctx, *pos, &outlen, d, l)) {
++ctx = EVP_CIPHER_CTX_new();
++if (!ctx) {
++ rv = ENOMEM;
++ goto out_cleanup;
++}
++EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, a->ckey, iv);
++EVP_CIPHER_CTX_set_padding(ctx, 0);
++if (!EVP_EncryptUpdate(ctx, *pos, &outlen, d, l)) {
+ rv = ENOMEM;
+ goto out_cleanup;
+ }
+-if (!EVP_EncryptFinal_ex(&ctx, (*pos) + outlen, &tmplen)) {
++if (!EVP_EncryptFinal_ex(ctx, (*pos) + outlen, &tmplen)) {
+ rv = ENOMEM; /* right? */
+ goto out_cleanup;
+ }
+@@ -2281,7 +2285,7 @@ aes_cbc_encrypt(lanserv_data_t *lan, session_t *session,
+ *data_len = outlen + 16;
+
+ out_cleanup:
+-EVP_CIPHER_CTX_cleanup(&ctx);
++EVP_CIPHER_CTX_free(ctx);
+ free(d);
+ return rv;
+ }
+@@ -2292,7 +2296,7 @@ aes_cbc_decrypt(lanserv_data_t *lan, session_t *session, msg_t *msg)
+ auth_data_t*a = &session->auth_data;
+ unsigned int l = msg->len;
+ unsigned char *d;
+-EVP_CIPHER_CTX ctx;
++EVP_CIPHER_CTX *ctx;
+ intoutlen;
+ unsigned char *pad;
+ intpadlen;
+@@ -2312,10 +2316,14 @@ aes_cbc_decrypt(lanserv_data_t *lan, session_t *session, msg_t *msg)
+ memcpy(d, msg->data+16, l);
+
+ /* Ok, we're set to do the decrypt operation. */
+-EVP_CIPHER_CTX_init(&ctx);
+-EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, a->k2, msg->data);
+-EVP_CIPHER_CTX_set_padding(&ctx, 0);
+-if (!EVP_DecryptUpdate(&ctx, msg->data+16, &outlen, d, l)) {
++ctx = EVP_CIPHER_CTX_new();
++if (!ctx) {
++ rv = ENOMEM;
++ goto out_cleanup;
++}
++EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, a->k2, msg->data);
++EVP_CIPHER_CTX_set_padding(ctx, 0);
++if (!EVP_DecryptUpdate(ctx, msg->data+16, &outlen, d, l)) {
+ rv = EINVAL;
+ goto out_cleanup;
+ }
+@@ -2348,7 +2356,7 @@ aes_cbc_decrypt(lanserv_data_t *lan, session_t *session, msg_t *msg)
+ msg->len = outlen;
+
+ out_cleanup:
+-EVP_CIPHER_CTX_cleanup(&ctx);
++EVP_CIPHER_CTX_free(ctx);
+ free(d);
+ return rv;
+ }
+diff --git a/lib/aes_cbc.c b/lib/aes_cbc.c
+index 483cdfbc521b..f20d69b8b1b3 100644
+--- a/lib/aes_cbc.c
b/lib/aes_cbc.c
+@@ -86,7 +86,7 @@ aes_cbc_encrypt(ipmi_con_t*ipmi,
+ unsigned int l = *payload_len;
+ unsigned int i;
+ unsigned char *d;
+-EVP_CIPHER_CTX ctx;
++EVP_CIPHER_CTX *ctx;
+ intrv;
+ intoutlen;
+ inttmplen;
+@@ -133,15 +133,19 @@ aes_cbc_encrypt(ipmi_con_t*ipmi,
+