cgi-io: support SHA256 checksums for file uploads
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)
commit4e6ab17306ee8435d9addc3f943deccbe6d06fb3
tree9896b8398459fbea8b66f9bbc9e32aab6d02c30c
parent96c658a532aed6f02e36bdbdb9bec6ad2c290c95
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>
Makefile
src/main.c