[packages/tpm-tools] - updated Allocate-OpenSSL-cipher-contexts-for-seal-unseal patch, release 2
qboosh
qboosh at pld-linux.org
Sat Oct 22 15:49:10 CEST 2022
commit cf39876be4085e26d63a38062f72f5af5bfbc144
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Oct 22 15:50:15 2022 +0200
- updated Allocate-OpenSSL-cipher-contexts-for-seal-unseal patch, release 2
...locate-OpenSSL-cipher-contexts-for-seal-unseal.patch | 17 ++++++++---------
tpm-tools.spec | 2 +-
2 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/tpm-tools.spec b/tpm-tools.spec
index cc31ea4..3bd0d21 100644
--- a/tpm-tools.spec
+++ b/tpm-tools.spec
@@ -2,7 +2,7 @@ Summary: Management tools for the TPM hardware
Summary(pl.UTF-8): Narzędzia zarządzające sprzętem TPM
Name: tpm-tools
Version: 1.3.9.2
-Release: 1
+Release: 2
License: CPL v1.0+
Group: Applications/System
Source0: https://downloads.sourceforge.net/trousers/%{name}-%{version}.tar.gz
diff --git a/0003-Allocate-OpenSSL-cipher-contexts-for-seal-unseal.patch b/0003-Allocate-OpenSSL-cipher-contexts-for-seal-unseal.patch
index 1f18e8b..7d79e59 100644
--- a/0003-Allocate-OpenSSL-cipher-contexts-for-seal-unseal.patch
+++ b/0003-Allocate-OpenSSL-cipher-contexts-for-seal-unseal.patch
@@ -13,10 +13,9 @@ Fixes: f50ab0949438 ("Support OpenSSL 1.1.0")
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/lib/tpm_unseal.c b/lib/tpm_unseal.c
-index fc4a84906a..005dab7f8f 100644
---- a/lib/tpm_unseal.c
-+++ b/lib/tpm_unseal.c
-@@ -86,7 +86,7 @@ int tpmUnsealFile( char* fname, unsigned char** tss_data, int* tss_size,
+--- tpm-tools-1.3.9.2/lib/tpm_unseal.c.orig 2020-10-01 11:28:08.000000000 +0200
++++ tpm-tools-1.3.9.2/lib/tpm_unseal.c 2022-10-22 15:45:54.247183137 +0200
+@@ -86,7 +86,7 @@ int tpmUnsealFile( char* fname, unsigned
int srkSecretLen;
unsigned char* res_data = NULL;
int res_size = 0;
@@ -25,11 +24,11 @@ index fc4a84906a..005dab7f8f 100644
BIO *bdata = NULL, *b64 = NULL, *bmem = NULL;
int bioRc;
-@@ -408,7 +408,12 @@ int tpmUnsealFile( char* fname, unsigned char** tss_data, int* tss_size,
+@@ -408,7 +408,12 @@ int tpmUnsealFile( char* fname, unsigned
}
/* Decode and decrypt the encrypted data */
-- EVP_CIPHER_CTX *ctx = NULL;
+- EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
+ ctx = EVP_CIPHER_CTX_new();
+ if ( ctx == NULL ) {
+ rc = TPMSEAL_STD_ERROR;
@@ -51,8 +50,8 @@ index fc4a84906a..005dab7f8f 100644
diff --git a/src/cmds/tpm_sealdata.c b/src/cmds/tpm_sealdata.c
index a2157f34b1..e25244a0f4 100644
---- a/src/cmds/tpm_sealdata.c
-+++ b/src/cmds/tpm_sealdata.c
+--- tpm-tools-1.3.9.2/src/cmds/tpm_sealdata.c.orig 2020-10-01 11:28:08.000000000 +0200
++++ tpm-tools-1.3.9.2/src/cmds/tpm_sealdata.c 2022-10-22 15:46:54.763521959 +0200
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
char *passwd = NULL;
int pswd_len;
@@ -66,7 +65,7 @@ index a2157f34b1..e25244a0f4 100644
BIO_puts(bdata, TPMSEAL_ENC_STRING);
bdata = BIO_push(b64, bdata);
-- EVP_CIPHER_CTX *ctx = NULL;
+- EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
+ ctx = EVP_CIPHER_CTX_new();
+ if (ctx == NULL) {
+ logError(_("Unable to allocate cipher context\n"));
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/tpm-tools.git/commitdiff/cf39876be4085e26d63a38062f72f5af5bfbc144
More information about the pld-cvs-commit
mailing list