commit dcb33cf3620a8e1f2ed97f0a9b3348fb831d05c2
Author: Arkadiusz Miśkiewicz <[email protected]>
Date:   Sat Sep 15 16:07:03 2018 +0200

    - rel 3; fix build with openssl 1.1.1

 ipmitool.spec |  6 ++--
 openssl.patch | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 102 insertions(+), 2 deletions(-)
---
diff --git a/ipmitool.spec b/ipmitool.spec
index b36911c..548d8e8 100644
--- a/ipmitool.spec
+++ b/ipmitool.spec
@@ -2,14 +2,15 @@ Summary:      Simple command-line interface to systems that 
support the IPMI
 Summary(pl.UTF-8):     Prosty interfejs do systemów obsługujących IPMI 
działający z linii poleceń
 Name:          ipmitool
 Version:       1.8.18
-Release:       2
+Release:       3
 License:       BSD
 Group:         Applications/System
 Source0:       
http://downloads.sourceforge.net/ipmitool/%{name}-%{version}.tar.gz
 # Source0-md5: 55304c6c5b994784222d3944d086fa30
 Source1:       %{name}-ipmievd.init
 Source2:       %{name}-ipmievd.sysconfig
-URL:           http://ipmitool.sourceforge.net/
+Patch0:                openssl.patch
+URL:           https://github.com/ipmitool/ipmitool
 BuildRequires: autoconf >= 2.62
 BuildRequires: automake
 BuildRequires: libltdl-devel
@@ -56,6 +57,7 @@ wysyłane do SEL i loguje wiadomości do sysloga.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__libtoolize} --ltdl
diff --git a/openssl.patch b/openssl.patch
new file mode 100644
index 0000000..42f5b8d
--- /dev/null
+++ b/openssl.patch
@@ -0,0 +1,98 @@
+commit b57487e360916ab3eaa50aa6d021c73b6337a4a0
+Author: Dennis Schridde <[email protected]>
+Date:   Wed Nov 30 17:33:00 2016 +0100
+
+    ID:461 - OpenSSL 1.1 compatibility - "error: storage size of 'ctx' isn't 
known"
+    
+    In OpenSSL 1.1 EVP_CIPHER_CTX became opaque, cf. `man 3ssl EVP_EncryptInit`
+    
+    Fixes: ID:461
+
+diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c 
b/src/plugins/lanplus/lanplus_crypt_impl.c
+index d5fac37..3c0df23 100644
+--- a/src/plugins/lanplus/lanplus_crypt_impl.c
++++ b/src/plugins/lanplus/lanplus_crypt_impl.c
+@@ -164,10 +164,10 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+                                                       uint8_t       * output,
+                                                       uint32_t        * 
bytes_written)
+ {
+-      EVP_CIPHER_CTX ctx;
+-      EVP_CIPHER_CTX_init(&ctx);
+-      EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv);
+-      EVP_CIPHER_CTX_set_padding(&ctx, 0);
++      EVP_CIPHER_CTX* ctx;
++      EVP_CIPHER_CTX_init(ctx);
++      EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
++      EVP_CIPHER_CTX_set_padding(ctx, 0);
+       
+ 
+       *bytes_written = 0;
+@@ -191,7 +191,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+       assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0);
+ 
+ 
+-      if(!EVP_EncryptUpdate(&ctx, output, (int *)bytes_written, input, 
input_length))
++      if(!EVP_EncryptUpdate(ctx, output, (int *)bytes_written, input, 
input_length))
+       {
+               /* Error */
+               *bytes_written = 0;
+@@ -201,7 +201,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+       {
+               uint32_t tmplen;
+ 
+-              if(!EVP_EncryptFinal_ex(&ctx, output + *bytes_written, (int 
*)&tmplen))
++              if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int 
*)&tmplen))
+               {
+                       *bytes_written = 0;
+                       return; /* Error */
+@@ -210,7 +210,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
+               {
+                       /* Success */
+                       *bytes_written += tmplen;
+-                      EVP_CIPHER_CTX_cleanup(&ctx);
++                      EVP_CIPHER_CTX_cleanup(ctx);
+               }
+       }
+ }
+@@ -239,10 +239,10 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+                                                       uint8_t       * output,
+                                                       uint32_t        * 
bytes_written)
+ {
+-      EVP_CIPHER_CTX ctx;
+-      EVP_CIPHER_CTX_init(&ctx);
+-      EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv);
+-      EVP_CIPHER_CTX_set_padding(&ctx, 0);
++      EVP_CIPHER_CTX* ctx;
++      EVP_CIPHER_CTX_init(ctx);
++      EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
++      EVP_CIPHER_CTX_set_padding(ctx, 0);
+ 
+ 
+       if (verbose >= 5)
+@@ -266,7 +266,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+       assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0);
+ 
+ 
+-      if (!EVP_DecryptUpdate(&ctx, output, (int *)bytes_written, input, 
input_length))
++      if (!EVP_DecryptUpdate(ctx, output, (int *)bytes_written, input, 
input_length))
+       {
+               /* Error */
+               lprintf(LOG_DEBUG, "ERROR: decrypt update failed");
+@@ -277,7 +277,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+       {
+               uint32_t tmplen;
+ 
+-              if (!EVP_DecryptFinal_ex(&ctx, output + *bytes_written, (int 
*)&tmplen))
++              if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int 
*)&tmplen))
+               {
+                       char buffer[1000];
+                       ERR_error_string(ERR_get_error(), buffer);
+@@ -290,7 +290,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
+               {
+                       /* Success */
+                       *bytes_written += tmplen;
+-                      EVP_CIPHER_CTX_cleanup(&ctx);
++                      EVP_CIPHER_CTX_cleanup(ctx);
+               }
+       }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ipmitool.git/commitdiff/dcb33cf3620a8e1f2ed97f0a9b3348fb831d05c2

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to