diff options
author | Jeremy Kerr <jeremy.kerr@canonical.com> | 2012-08-22 16:50:04 +0800 |
---|---|---|
committer | Jeremy Kerr <jeremy.kerr@canonical.com> | 2012-08-22 16:53:49 +0800 |
commit | fd553e841af7661a4837a0dce4f580edb86e797f (patch) | |
tree | ef7f262509e3cd5b3cd91ac0d108b4b503ec521e | |
parent | feddcb4f4fc94a3bfd1858f1c5d37062fc9c1f3a (diff) | |
download | sbsigntools-fd553e841af7661a4837a0dce4f580edb86e797f.tar.gz |
sbvarsign: WIN_CERTIFICATE.dwLength should include the header size
Despite what the Authenticode spec says ("dwLength is set to the length
of bCertificate"), the MS var sign tool and EDK2 sources include the
header in the dwLength size.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
-rw-r--r-- | src/sbvarsign.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sbvarsign.c b/src/sbvarsign.c index c1e0c84..3fc4599 100644 --- a/src/sbvarsign.c +++ b/src/sbvarsign.c @@ -273,7 +273,7 @@ static int add_auth_descriptor(struct varsign_context *ctx) auth = talloc_size(ctx, sizeof(*auth) + len); auth->TimeStamp = timestamp; - auth->AuthInfo.Hdr.dwLength = len + sizeof(EFI_GUID); + auth->AuthInfo.Hdr.dwLength = len + sizeof(auth->AuthInfo); auth->AuthInfo.Hdr.wRevision = 0x0200; auth->AuthInfo.Hdr.wCertificateType = 0x0EF1; auth->AuthInfo.CertType = cert_pkcs7_guid; |