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

2016-03-26 Thread Paul Fertser
Weedy writes: > $ 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!

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

2016-03-26 Thread Weedy
$ openssl dgst -sha256 ubcd535.iso | awk '/^SHA256/ { gsub(/^SHA256\(/,"",$1); gsub(/\)\=/,"",$1); print $2" "$1 }' f4ad684385845a0dfcd944dc6b6a0aa00886a05a7143efafa8403e01fea49849 ubcd535.iso $ sha256sum ubcd535.iso f4ad684385845a0dfcd944dc6b6a0aa00886a05a7143efafa8403e01fea49849 ubcd535.iso

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

2016-03-22 Thread francesco . borromini
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?

2016-03-22 Thread John Crispin
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'

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

2016-03-22 Thread Bastian Bittorf
* 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] Sha256 checksum generation of images: why OpenSSL instead of sha256sum?

2016-03-21 Thread Stijn Segers
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