diff options
author | Franklin Wei <me@fwei.tk> | 2018-06-25 11:02:19 -0400 |
---|---|---|
committer | Franklin Wei <me@fwei.tk> | 2018-06-25 11:02:19 -0400 |
commit | 91d71b86d0d93e49c610baf01df593ec21752048 (patch) | |
tree | e5fd5243c6e711c4b328b6969e6d41d77f0e72af /service_provider.h | |
parent | 68932344b45fb8938e86513220eb39b3b7306c5b (diff) | |
download | csaa-91d71b86d0d93e49c610baf01df593ec21752048.zip csaa-91d71b86d0d93e49c610baf01df593ec21752048.tar.gz csaa-91d71b86d0d93e49c610baf01df593ec21752048.tar.bz2 csaa-91d71b86d0d93e49c610baf01df593ec21752048.tar.xz |
Update client; provide ACL in response; add encryption
Changed the command-line interface a bit to make it less sensitive to the
ordering of switches, though modifyacl still has its old behavior. The
client now supports the -e flag to encrypt the file with a random key.
Diffstat (limited to 'service_provider.h')
-rw-r--r-- | service_provider.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/service_provider.h b/service_provider.h index f5fd4bc..1150dad 100644 --- a/service_provider.h +++ b/service_provider.h @@ -35,6 +35,7 @@ struct user_request { enum { USERREQ_NONE = 0, CREATE_FILE, MODIFY_FILE, MODIFY_ACL, RETRIEVE_INFO, RETRIEVE_FILE } type; uint64_t user_id; union { + uint64_t file_idx; struct { uint64_t file_idx; /* ACL IOMT will follow */ @@ -57,8 +58,8 @@ struct user_request { /* same structure for retrieve file and retrieve info */ uint64_t file_idx, version; /* service will respond with either version_info struct, - * plus HMAC, or file contents and key (which the client - * can verify themselves) */ + * the serialized ACL, and an HMAC, or file contents and + * key (which the client can verify themselves) */ } retrieve; }; } __attribute__((packed)); @@ -110,7 +111,8 @@ 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 *hmac); + hash_t *hmac, + struct iomt **acl_out); /* Again, version=0 selects the latest version. */ void *sp_retrieve_file(struct service_provider *sp, @@ -118,6 +120,7 @@ void *sp_retrieve_file(struct service_provider *sp, uint64_t file_idx, uint64_t version, hash_t *encrypted_secret, + hash_t *kf, struct iomt **buildcode, struct iomt **composefile, size_t *len); |