[OpenWrt-Devel] Sha256 checksum generation of images: why OpenSSL instead of sha256sum?

Stijn Segers francesco.borromini at inventati.org
Mon Mar 21 16:57:39 EDT 2016


Hi guys,

I have a nice script on my routers that pulls in a new firmware image, 
validates the checksum, then flashes it. I switched it to
sha256 (from md5), noticed the format in the sha256sums was different, 
but didn't pay it too much mind - except that now, the busybox 
sha256sum function chokes on the layout, and sha256sum thinks the 
checksums don't match.

I started looking into the build code and found this in 
include/image.mk:

$(call Image/Checksum,md5sum --binary,md5sums)
$(call Image/Checksum,openssl dgst -sha256,sha256sums)

Is there a specific reason why OpenSSL is used instead of sha256sum? If 
not, I can whip up a patch to bring it in line with the 'historical' 
md5sum code.

Thanks!

Stijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20160321/6f0a3833/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list