diff options
author | Jeremi Piotrowski <jeremi.piotrowski@gmail.com> | 2021-09-27 17:27:27 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2022-06-13 18:12:08 -0400 |
commit | 75d8405eca50bc62da4d6115f09f9a42969092e1 (patch) | |
tree | 5f3b920c25203abaee6b8b8a29a20abc577a6390 | |
parent | d6e4bff8f1ec1118282bea9413d74a94388108ac (diff) | |
download | sbsigntools-75d8405eca50bc62da4d6115f09f9a42969092e1.tar.gz |
Fix openssl-3.0 issue involving ASN1 xxx_it
Use ASN1_ITEM_rptr() instead of taking the address of IDC_PEID_it.
openssl-3.0 changed the type of TYPE_it from `const ASN1_ITEM TYPE_it` to
`const ASN1_ITEM *TYPE_it(void)`. This was previously hidden behind
OPENSSL_EXPORT_VAR_AS_FUNCTION but in 3.0 only the function version is
available. This change should have been transparent to the application, but
only if the `ASN1_ITEM_rptr()` macro is used.
This change passes `make check` with both openssl 1.1 and 3.0.
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | src/idc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -189,7 +189,7 @@ int IDC_set(PKCS7 *p7, PKCS7_SIGNER_INFO *si, struct image *image) idc->data->type = OBJ_nid2obj(peid_nid); idc->data->value = ASN1_TYPE_new(); - type_set_sequence(image, idc->data->value, peid, &IDC_PEID_it); + type_set_sequence(image, idc->data->value, peid, ASN1_ITEM_rptr(IDC_PEID)); idc->digest->alg->parameter = ASN1_TYPE_new(); idc->digest->alg->algorithm = OBJ_nid2obj(NID_sha256); |