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 /service_provider.h | |
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 'service_provider.h')
-rw-r--r-- | service_provider.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/service_provider.h b/service_provider.h index 4dcb109..b64bc82 100644 --- a/service_provider.h +++ b/service_provider.h @@ -57,6 +57,10 @@ struct user_request { struct { /* same structure for retrieve file and retrieve info */ uint64_t file_idx, version; + + /* used only for RETRIEVE_INFO */ + hash_t nonce; + /* service will respond with either version_info struct, * the serialized ACL, and an HMAC, or file contents and * key (which the client can verify themselves) */ @@ -116,6 +120,7 @@ struct tm_request sp_modifyfile(struct service_provider *sp, struct version_info sp_fileinfo(struct service_provider *sp, uint64_t user_id, uint64_t file_idx, uint64_t version, + hash_t nonce, hash_t *hmac, struct iomt **acl_out); |