aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorEmmanuel N. Millan <emmanueln@gmail.com>2020-03-14 05:55:35 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-03-14 05:55:49 +0700
commitec2b46007bb626d26331690e5c496d4fc9a839a2 (patch)
tree2526f9264290e96710f8ef2d030a6a8a1f4ef596 /system
parent1cd68324729b0dc6aceaa8a9a64c3f1afc36d9fd (diff)
system/ipmitool: Fix build on -current.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/ipmitool/ipmitool-openssl-1.1.patch88
-rw-r--r--system/ipmitool/ipmitool.SlackBuild3
2 files changed, 91 insertions, 0 deletions
diff --git a/system/ipmitool/ipmitool-openssl-1.1.patch b/system/ipmitool/ipmitool-openssl-1.1.patch
new file mode 100644
index 0000000000000..39b311f6e9154
--- /dev/null
+++ b/system/ipmitool/ipmitool-openssl-1.1.patch
@@ -0,0 +1,88 @@
+--- src/plugins/lanplus/lanplus_crypt_impl.c.orig 2020-01-05 20:05:14.536039135 +0100
++++ src/plugins/lanplus/lanplus_crypt_impl.c 2020-01-05 20:09:48.808613128 +0100
+@@ -164,10 +164,10 @@
+ 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_new();
++ 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 @@
+ 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 @@
+ {
+ 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,8 @@
+ {
+ /* Success */
+ *bytes_written += tmplen;
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_cleanup(ctx);
++ EVP_CIPHER_CTX_free(ctx);
+ }
+ }
+ }
+@@ -239,10 +240,10 @@
+ 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_new();
++ 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 +267,7 @@
+ 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 +278,7 @@
+ {
+ 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 +291,8 @@
+ {
+ /* Success */
+ *bytes_written += tmplen;
+- EVP_CIPHER_CTX_cleanup(&ctx);
++ EVP_CIPHER_CTX_cleanup(ctx);
++ EVP_CIPHER_CTX_free(ctx);
+ }
+ }
+
diff --git a/system/ipmitool/ipmitool.SlackBuild b/system/ipmitool/ipmitool.SlackBuild
index ca5ec00020773..40fadb21fd669 100644
--- a/system/ipmitool/ipmitool.SlackBuild
+++ b/system/ipmitool/ipmitool.SlackBuild
@@ -58,6 +58,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix compilation with openssl-1.1
+[ "`openssl version | grep 1.1`" ] && patch -p0 < $CWD/ipmitool-openssl-1.1.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \