summaryrefslogtreecommitdiffstats
path: root/recipes-support/sbsigntool/sbsigntool
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei.gherzan@huawei.com>2021-12-09 15:14:39 +0100
committerAnuj Mittal <anuj.mittal@intel.com>2021-12-10 16:41:29 +0800
commitaa8482af7b286f8fe8f7aae648938d4ebf0283c5 (patch)
tree362becac7d01366a7b9ab1eff7c3524f30053f0f /recipes-support/sbsigntool/sbsigntool
parent48440091d4cba2712ea2c23a779c044b07f5bb4d (diff)
downloadmeta-intel-aa8482af7b286f8fe8f7aae648938d4ebf0283c5.tar.gz
sbsigntool: Fix build with Openssl 3.0
The patch fixes the build when OpenSSL 3.0 is used. We also disable errors on deprecations as the code uses a good amount of them that look to be harmless. Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-support/sbsigntool/sbsigntool')
-rw-r--r--recipes-support/sbsigntool/sbsigntool/0002-fix-openssl-3-0.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/recipes-support/sbsigntool/sbsigntool/0002-fix-openssl-3-0.patch b/recipes-support/sbsigntool/sbsigntool/0002-fix-openssl-3-0.patch
new file mode 100644
index 00000000..8a277947
--- /dev/null
+++ b/recipes-support/sbsigntool/sbsigntool/0002-fix-openssl-3-0.patch
@@ -0,0 +1,32 @@
1Use ASN1_ITEM_rptr() instead of taking the address of IDC_PEID_it.
2
3openssl-3.0 changed the type of TYPE_it from `const ASN1_ITEM TYPE_it` to
4`const ASN1_ITEM *TYPE_it(void)`. This was previously hidden behind
5OPENSSL_EXPORT_VAR_AS_FUNCTION but in 3.0 only the function version is
6available. This change should have been transparent to the application, but
7only if the `ASN1_ITEM_rptr()` macro is used.
8
9This change passes `make check` with both openssl 1.1 and 3.0.
10
11Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
12Upstream-status: Submited [https://groups.io/g/sbsigntools/topic/patch_fix_openssl_3_0_issue/85903418]
13---
14 src/idc.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/src/idc.c b/src/idc.c
18index 6d87bd4..0a82218 100644
19--- a/src/idc.c
20+++ b/src/idc.c
21@@ -189,7 +189,7 @@ int IDC_set(PKCS7 *p7, PKCS7_SIGNER_INFO *si, struct image *image)
22
23 idc->data->type = OBJ_nid2obj(peid_nid);
24 idc->data->value = ASN1_TYPE_new();
25- type_set_sequence(image, idc->data->value, peid, &IDC_PEID_it);
26+ type_set_sequence(image, idc->data->value, peid, ASN1_ITEM_rptr(IDC_PEID));
27
28 idc->digest->alg->parameter = ASN1_TYPE_new();
29 idc->digest->alg->algorithm = OBJ_nid2obj(NID_sha256);
30--
312.25.1
32