aboutsummaryrefslogtreecommitdiff
path: root/service_provider.h
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-06-15 17:56:29 -0400
committerFranklin Wei <me@fwei.tk>2018-06-15 17:56:29 -0400
commit30a65725a518dfeebe2f4e16f914fc2c712188fa (patch)
tree0645e962b97916d6ef3ab130b09ca4196fa242b5 /service_provider.h
parenta0df949870f5c18b6af29bbfe70276fc6b1596dc (diff)
downloadcsaa-30a65725a518dfeebe2f4e16f914fc2c712188fa.zip
csaa-30a65725a518dfeebe2f4e16f914fc2c712188fa.tar.gz
csaa-30a65725a518dfeebe2f4e16f914fc2c712188fa.tar.bz2
csaa-30a65725a518dfeebe2f4e16f914fc2c712188fa.tar.xz
Further refactoring and clean-up; more work on service provider
Diffstat (limited to 'service_provider.h')
-rw-r--r--service_provider.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/service_provider.h b/service_provider.h
index 6deb814..a9860cc 100644
--- a/service_provider.h
+++ b/service_provider.h
@@ -18,8 +18,22 @@ struct tm_cert sp_request(struct service_provider *sp,
struct tm_cert *vr_out, hash_t *vr_hmac_out,
hash_t *ack_hmac_out,
hash_t encrypted_secret, hash_t kf,
- const void *encrypted_contents,
- size_t contents_len);
+ const void *encrypted_contents, size_t contents_len,
+ struct iomt *new_acl);
+
+/* Reserve a new file index with user_id added to the ACL. Returns
+ * cert on failure. Authenticated with ack_hmac, which is the returned
+ * request with a zero byte appended, signed by the module. */
+struct user_request sp_createfile(struct service_provider *sp,
+ uint64_t user_id, const void *key, size_t keylen,
+ hash_t *ack_hmac);
+
+struct user_request sp_modifyfile(struct service_provider *sp,
+ uint64_t user_id, const void *key, size_t keylen,
+ uint64_t file_idx,
+ hash_t encrypted_secret,
+ const void *encrypted_file, size_t filelen,
+ hash_t *ack_hmac);
void sp_test(void);