Re: [OpenWrt-Devel] Sha256 checksum generation of images: why OpenSSL instead of sha256sum?
Weedywrites: > $ openssl dgst -sha256 ubcd535.iso | awk '/^SHA256/ { > gsub(/^SHA256\(/,"",$1); gsub(/\)\=/,"",$1); print $2" "$1 }' Or sed -E 's/.*\((.*)\)= (.*)/\2 \1/' -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fercer...@gmail.com ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Sha256 checksum generation of images: why OpenSSL instead of sha256sum?
$ openssl dgst -sha256 ubcd535.iso | awk '/^SHA256/ { gsub(/^SHA256\(/,"",$1); gsub(/\)\=/,"",$1); print $2" "$1 }' f4ad684385845a0dfcd944dc6b6a0aa00886a05a7143efafa8403e01fea49849 ubcd535.iso $ sha256sum ubcd535.iso f4ad684385845a0dfcd944dc6b6a0aa00886a05a7143efafa8403e01fea49849 ubcd535.iso It's fairly painless to reformat. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Sha256 checksum generation of images: why OpenSSL instead of sha256sum?
OK, thanks. I build off a local branch either way, with regular rebasing. Easier for me to replace the code :) Stijn ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Sha256 checksum generation of images: why OpenSSL instead of sha256sum?
On 22/03/2016 08:51, Bastian Bittorf wrote: > * Stijn Segers[22.03.2016 08:47]: >> Is there a specific reason why OpenSSL is used instead of sha256sum? > > it's all about portability. OpenSSL is widely available, and sha256 not. > maybe you can 'sanitize' the output somehow? > > bye, bastian > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > i copied it from the buildbot setup and they use openssl for portability afaik John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Sha256 checksum generation of images: why OpenSSL instead of sha256sum?
* Stijn Segers[22.03.2016 08:47]: > Is there a specific reason why OpenSSL is used instead of sha256sum? it's all about portability. OpenSSL is widely available, and sha256 not. maybe you can 'sanitize' the output somehow? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Sha256 checksum generation of images: why OpenSSL instead of sha256sum?
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 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel