Re: [PATCH virtio-win-pkg-scripts] cpdrivers: accept unsigned binaries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/20/2016 08:57 AM, Roman Kagan wrote:
> PE binaries included in the driver package (.sys, .dll, etc) may contain
> no internal signatures; in that case their digest in the catalog is
> calculated till the end of the file.
> 
> Signed-off-by: Roman Kagan <rkagan@xxxxxxxxxxxxx>
> ---
>  util/cpdrivers.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/util/cpdrivers.py b/util/cpdrivers.py
> index 305b3ae..f4b1d6e 100644
> --- a/util/cpdrivers.py
> +++ b/util/cpdrivers.py
> @@ -65,6 +65,8 @@ def calcPEHash(data, hashobj):
>          0x20b: 168     # PE32+
>          }[pemagic]
>      sec, seclen = struct.unpack_from("2I", data, secdir)
> +    if sec == 0:
> +        sec = len(data)
>      # signature is always the tail part
>      assert sec + seclen == len(data)
>  
> 

Thanks, pushed now

- Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux