As explained in configure.ac:

> AC_CHECK_LIB([z], [crc32], [], [AC_MSG_ERROR([need crc32 implementation from libz])])

The CRC32 implementation comprises a lookup table, and a short loop to process the data.

The main purpose of zlib is to support compression, and I wonder if it is worth taking this dependency for a relatively straightforward checksum implementation.

I also notice that there is an implementation of precisely the same CRC32 algorithm in gnu-efi, and EFI Boot Guard already depends on gnu-efi.

Today, the dependency on crc32 in zlib means that users of libebgenv.a need to link -lz (as named in libebgenv.pc). Changing that to a dependency on gnu-efi (for CalculateCrc) would mean that users of libebgenv.a would instead need to link -lefi. Though there is a zlib.pc for the current use case, there is no matching gnuefi.pc available as far as I know.

With that in mind, I think the most appropriate simplification is to provide a crc32() implementation in EFI Boot Guard itself (eg env/crc32.c).

Is there any appetite to remove this dependency on zlib?

Are there other features planned which potentially depend on zlib?

Earl

--
You received this message because you are subscribed to the Google Groups "EFI Boot 
Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/736b37b3-09ab-d0b3-aa07-59f3fd4768e6%40yahoo.com.

Reply via email to