aboutsummaryrefslogtreecommitdiff
path: root/helper.c
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-06-08 00:45:45 +0000
committerFranklin Wei <me@fwei.tk>2018-06-08 21:53:14 -0400
commitcae99b638f54748e52a10ca613c1758c9646e2d0 (patch)
tree6fa50ef1148b53de5ceeebee8febf686f8f28db7 /helper.c
parent040a9bab4cafb4dd6ec44485a5c421d99a00cffe (diff)
downloadcsaa-cae99b638f54748e52a10ca613c1758c9646e2d0.zip
csaa-cae99b638f54748e52a10ca613c1758c9646e2d0.tar.gz
csaa-cae99b638f54748e52a10ca613c1758c9646e2d0.tar.bz2
csaa-cae99b638f54748e52a10ca613c1758c9646e2d0.tar.xz
Finish testing file modification in sp_test()
Diffstat (limited to '')
-rw-r--r--helper.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/helper.c b/helper.c
index 1a751e1..20b6ac9 100644
--- a/helper.c
+++ b/helper.c
@@ -23,3 +23,22 @@ struct tm_cert cert_ru(struct trusted_module *tm,
return tm_cert_record_update(tm, &nu, nu_hmac, node, new_val, hmac_out);
}
+
+struct tm_cert cert_rv(struct trusted_module *tm,
+ const struct iomt_node *node,
+ const hash_t *comp, const int *orders, size_t n,
+ hash_t *hmac_out)
+{
+ hash_t nu_hmac;
+ struct tm_cert nu = tm_cert_node_update(tm,
+ hash_node(node),
+ hash_node(node),
+ comp, orders, n,
+ &nu_hmac);
+
+ return tm_cert_record_verify(tm,
+ &nu, nu_hmac,
+ node,
+ hmac_out,
+ 0, NULL, NULL);
+}