diff options
author | Jeremy Kerr <jeremy.kerr@canonical.com> | 2012-04-23 17:36:08 +0800 |
---|---|---|
committer | Jeremy Kerr <jeremy.kerr@canonical.com> | 2012-04-23 17:36:08 +0800 |
commit | d8eadfcc24c8b8fb8c867550a06a8906d1d614bf (patch) | |
tree | 01e33cdf840f8f061fc7029beb2c281e246c5da2 | |
parent | 3b802fe3da3c126d74e0b053c7b951ce1e480bfa (diff) | |
download | sbsigntools-d8eadfcc24c8b8fb8c867550a06a8906d1d614bf.tar.gz |
idc: allocate using the image context
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
-rw-r--r-- | idc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -148,7 +148,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(NULL, idc->data->value, peid, &IDC_PEID_it); + type_set_sequence(image, idc->data->value, peid, &IDC_PEID_it); idc->digest->alg->parameter = ASN1_TYPE_new(); idc->digest->alg->algorithm = OBJ_nid2obj(NID_sha256); @@ -156,7 +156,7 @@ int IDC_set(PKCS7 *p7, PKCS7_SIGNER_INFO *si, struct image *image) ASN1_OCTET_STRING_set(idc->digest->digest, sha, sizeof(sha)); len = i2d_IDC(idc, NULL); - tmp = buf = talloc_array(NULL, uint8_t, len); + tmp = buf = talloc_array(image, uint8_t, len); i2d_IDC(idc, &tmp); /* Add the contentType authenticated attribute */ |