[riot-notifications] [RIOT-OS/RIOT] sys: provide over-the-air update mechanism (#8902)

Kaspar Schleiser notifications at github.com
Tue Apr 10 23:10:42 CEST 2018


kaspar030 commented on this pull request.



> +    if (res) {
+        printf("signature check failed\n");
+        return -1;
+    } else {
+        printf("signature check passed\n");
+    }
+
+    off_t size = fsize(argv[2]);
+    if (size == sizeof(firmware_metadata_t)) {
+        printf("hash check skipped\n");
+        goto out;
+    }
+
+    char hash[SHA256_DIGEST_LENGTH];
+    do_sha256(argv[2], hash, sizeof(firmware_metadata_t));
+    res = memcmp(hash, metadata.hash, SHA256_DIGEST_LENGTH) ? 1 : 0;

wontfix

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/8902#discussion_r180568831
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180410/cc983920/attachment.html>


More information about the notifications mailing list