mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
sys-apps/ipmitool: remove unused patches
Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/19598 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
This commit is contained in:
committed by
Lars Wendler
parent
e57fddd217
commit
18bd451e5f
@@ -1,22 +0,0 @@
|
||||
--- a/include/ipmitool/ipmi_hpmfwupg.h
|
||||
+++ b/include/ipmitool/ipmi_hpmfwupg.h
|
||||
@@ -800,8 +800,6 @@
|
||||
char descString[HPMFWUPG_DESC_STRING_LENGTH + 1];
|
||||
}VERSIONINFO, *PVERSIONINFO;
|
||||
|
||||
-VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
|
||||
-
|
||||
#define TARGET_VER (0x01)
|
||||
#define ROLLBACK_VER (0x02)
|
||||
#define IMAGE_VER (0x04)
|
||||
--- a/lib/ipmi_hpmfwupg.c
|
||||
+++ b/lib/ipmi_hpmfwupg.c
|
||||
@@ -52,6 +52,8 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
+static VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
|
||||
+
|
||||
/* From src/plugins/ipmi_intf.c: */
|
||||
uint16_t
|
||||
ipmi_intf_get_max_request_data_size(struct ipmi_intf * intf);
|
||||
@@ -1,145 +0,0 @@
|
||||
Taken from various upstream commits:
|
||||
|
||||
https://github.com/ipmitool/ipmitool/commit/b57487e360916ab3eaa50aa6d021c73b6337a4a0
|
||||
https://github.com/ipmitool/ipmitool/commit/77fe5635037ebaf411cae46cf5045ca819b5c145
|
||||
https://github.com/ipmitool/ipmitool/commit/f004b4b7197fc83e7d47ec8cbcaefffa9a922717
|
||||
https://github.com/ipmitool/ipmitool/commit/f004b4b7197fc83e7d47ec8cbcaefffa9a922717
|
||||
|
||||
--- ipmitool-1.8.18/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||
+++ ipmitool-1.8.18/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||
@@ -164,11 +164,7 @@
|
||||
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 = NULL;
|
||||
|
||||
*bytes_written = 0;
|
||||
|
||||
@@ -182,6 +178,14 @@
|
||||
printbuf(input, input_length, "encrypting this data");
|
||||
}
|
||||
|
||||
+ ctx = EVP_CIPHER_CTX_new();
|
||||
+ if (ctx == NULL) {
|
||||
+ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
|
||||
+ return;
|
||||
+ }
|
||||
+ EVP_CIPHER_CTX_init(ctx);
|
||||
+ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||
|
||||
/*
|
||||
* The default implementation adds a whole block of padding if the input
|
||||
@@ -191,28 +195,28 @@
|
||||
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;
|
||||
- return;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t tmplen;
|
||||
|
||||
- if(!EVP_EncryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen))
|
||||
+ if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
|
||||
{
|
||||
+ /* Error */
|
||||
*bytes_written = 0;
|
||||
- return; /* Error */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Success */
|
||||
*bytes_written += tmplen;
|
||||
- EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
}
|
||||
}
|
||||
+ /* performs cleanup and free */
|
||||
+ EVP_CIPHER_CTX_free(ctx);
|
||||
}
|
||||
|
||||
|
||||
@@ -239,11 +243,7 @@
|
||||
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 = NULL;
|
||||
|
||||
if (verbose >= 5)
|
||||
{
|
||||
@@ -252,12 +252,20 @@
|
||||
printbuf(input, input_length, "decrypting this data");
|
||||
}
|
||||
|
||||
-
|
||||
*bytes_written = 0;
|
||||
|
||||
if (input_length == 0)
|
||||
return;
|
||||
|
||||
+ ctx = EVP_CIPHER_CTX_new();
|
||||
+ if (ctx == NULL) {
|
||||
+ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
|
||||
+ return;
|
||||
+ }
|
||||
+ EVP_CIPHER_CTX_init(ctx);
|
||||
+ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||
+
|
||||
/*
|
||||
* The default implementation adds a whole block of padding if the input
|
||||
* data is perfectly aligned. We would like to keep that from happening.
|
||||
@@ -266,33 +274,33 @@
|
||||
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");
|
||||
*bytes_written = 0;
|
||||
- return;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t tmplen;
|
||||
|
||||
- if (!EVP_DecryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen))
|
||||
+ if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
|
||||
{
|
||||
+ /* Error */
|
||||
char buffer[1000];
|
||||
ERR_error_string(ERR_get_error(), buffer);
|
||||
lprintf(LOG_DEBUG, "the ERR error %s", buffer);
|
||||
lprintf(LOG_DEBUG, "ERROR: decrypt final failed");
|
||||
*bytes_written = 0;
|
||||
- return; /* Error */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Success */
|
||||
*bytes_written += tmplen;
|
||||
- EVP_CIPHER_CTX_cleanup(&ctx);
|
||||
}
|
||||
}
|
||||
+ /* performs cleanup and free */
|
||||
+ EVP_CIPHER_CTX_free(ctx);
|
||||
|
||||
if (verbose >= 5)
|
||||
{
|
||||
Reference in New Issue
Block a user