Changeset View
Changeset View
Standalone View
Standalone View
sbsigntool/files/patch-src-idc.c
- This file was added.
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- src/idc.c.orig 2012-10-01 08:11:52.000000000 -0700 | |||||
+++ src/idc.c 2021-01-05 18:48:13.369936000 -0800 | |||||
@@ -238,7 +238,7 @@ | |||||
/* extract the idc from the signed PKCS7 'other' data */ | |||||
str = p7->d.sign->contents->d.other->value.asn1_string; | |||||
- idcbuf = buf = ASN1_STRING_data(str); | |||||
+ idcbuf = buf = ASN1_STRING_get0_data(str); | |||||
idc = d2i_IDC(NULL, &buf, ASN1_STRING_length(str)); | |||||
/* If we were passed a BIO, write the idc data, minus type and length, | |||||
@@ -289,7 +289,7 @@ | |||||
} | |||||
/* check hash against the one we calculated from the image */ | |||||
- buf = ASN1_STRING_data(str); | |||||
+ buf = ASN1_STRING_get0_data(str); | |||||
if (memcmp(buf, sha, sizeof(sha))) { | |||||
fprintf(stderr, "Hash doesn't match image\n"); | |||||
fprintf(stderr, " got: %s\n", sha256_str(buf)); |