diff options
author | Franklin Wei <me@fwei.tk> | 2018-07-06 22:34:04 -0400 |
---|---|---|
committer | Franklin Wei <me@fwei.tk> | 2018-07-06 22:34:04 -0400 |
commit | 3e7b74359f56c0518abcd420e85a5e3e778e8fd1 (patch) | |
tree | 26ace22aa872ffe4bc3fe26364991b04e1b104a8 /iomt.c | |
parent | fa2a0b2f0cf079695382020a8b418445dff0af97 (diff) | |
download | csaa-3e7b74359f56c0518abcd420e85a5e3e778e8fd1.zip csaa-3e7b74359f56c0518abcd420e85a5e3e778e8fd1.tar.gz csaa-3e7b74359f56c0518abcd420e85a5e3e778e8fd1.tar.bz2 csaa-3e7b74359f56c0518abcd420e85a5e3e778e8fd1.tar.xz |
Add nonce to version info response (to prevent replay); various code cleanup
Diffstat (limited to 'iomt.c')
-rw-r--r-- | iomt.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -11,7 +11,10 @@ hash_t hash_node(const struct iomt_node node) { - return sha256(&node, sizeof(node)); + if(node.idx != 0) + return sha256(&node, sizeof(node)); + else + return hash_null; } static void reset_and_bind(const struct iomt *tree, sqlite3_stmt *st) |