summaryrefslogtreecommitdiffstats
path: root/meta-tpm/recipes-tpm/openssl-tpm-engine/files/openssl11_build_fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-tpm/recipes-tpm/openssl-tpm-engine/files/openssl11_build_fix.patch')
-rw-r--r--meta-tpm/recipes-tpm/openssl-tpm-engine/files/openssl11_build_fix.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-tpm/recipes-tpm/openssl-tpm-engine/files/openssl11_build_fix.patch b/meta-tpm/recipes-tpm/openssl-tpm-engine/files/openssl11_build_fix.patch
new file mode 100644
index 0000000..2f8eb81
--- /dev/null
+++ b/meta-tpm/recipes-tpm/openssl-tpm-engine/files/openssl11_build_fix.patch
@@ -0,0 +1,34 @@
1Fix compiling for openssl 1.1
2
3Upstream-Status: Pending
4Signed-off-by: Armin Kuster <akuster808@gmail.com>
5
6Index: git/src/e_tpm.c
7===================================================================
8--- git.orig/src/e_tpm.c
9+++ git/src/e_tpm.c
10@@ -265,19 +265,20 @@ static int tpm_decode_base64(unsigned ch
11 int *out_len)
12 {
13 int total_len, len, ret;
14- EVP_ENCODE_CTX dctx;
15+ EVP_ENCODE_CTX *dctx;
16
17- EVP_DecodeInit(&dctx);
18+ dctx = EVP_ENCODE_CTX_new();
19+ EVP_DecodeInit(dctx);
20
21 total_len = 0;
22- ret = EVP_DecodeUpdate(&dctx, outdata, &len, indata, in_len);
23+ ret = EVP_DecodeUpdate(dctx, outdata, &len, indata, in_len);
24 if (ret < 0) {
25 TSSerr(TPM_F_TPM_DECODE_BASE64, TPM_R_DECODE_BASE64_FAILED);
26 return 1;
27 }
28
29 total_len += len;
30- ret = EVP_DecodeFinal(&dctx, outdata, &len);
31+ ret = EVP_DecodeFinal(dctx, outdata, &len);
32 if (ret < 0) {
33 TSSerr(TPM_F_TPM_DECODE_BASE64, TPM_R_DECODE_BASE64_FAILED);
34 return 1;