Neither sbsign nor pesign set this flag in SpcPeImageData->flags,
which is about which resources should be included specifying "Which
portions of the Windows PE file are hashed." according to the
authenticode spec. However, this is followed by "Although flags is
always present, it is ignored when calculating the file hash for both
signing and verification purposes". So as it doesn't seem to do
anything useful and the other tools don't set any of these flags
either, let's follow suite and not set this flag ourselves either.
if (!peid)
return log_oom();
- if (ASN1_BIT_STRING_set_bit(peid->flags, 0, 1) == 0)
- return log_oom();
-
peid->file = TAKE_PTR(link);
_cleanup_free_ uint8_t *peidraw = NULL;