mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
sbsign: Don't set bit in SpcPeImageData->flags
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. (cherry picked from commit 66584a9335f9a3be5666209ddb34ae7d7f547189)
This commit is contained in:
parent
77af82eeb7
commit
575c975842
@ -295,9 +295,6 @@ static int verb_sign(int argc, char *argv[], void *userdata) {
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user