cgi-io: support SHA256 checksums for file uploads 5118/head
authorJo-Philipp Wich <jo@mein.io>
Mon, 13 Nov 2017 16:00:58 +0000 (17:00 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 13 Nov 2017 16:16:29 +0000 (17:16 +0100)
commit46d0799c43e31ca04108cfb31b59486f1a7989db
tree4325c47a89879becf1dc4ddf51e2d341e5f38573
parent68ae65f3bcf89161b2a983c3fa1f8979df6c0f76
cgi-io: support SHA256 checksums for file uploads

Report SHA256 checksums in addition to the MD5 ones to make cgi-io suitable
for sysupgrade image verification.

Also allow stat(), md5sum and/or sha256sum to fail and respond with a JSON
null value instead, leaving it to the frontend to handle errors as needed.

Fixes #4790.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
net/cgi-io/Makefile
net/cgi-io/src/main.c