aboutsummaryrefslogtreecommitdiff
path: root/lib/libeclat.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-07-31 14:30:04 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2013-07-31 14:40:37 +0300
commitceaa9f9d20f5db8b36d275fe65de43b95b090fc1 (patch)
tree37386cd4ccec4f56a8147e13ce0ec0467d3e82f2 /lib/libeclat.h
parentfafa83f76002b4b55c94ae10d9e05a215c934347 (diff)
downloadeclat-ceaa9f9d20f5db8b36d275fe65de43b95b090fc1.tar.gz
eclat-ceaa9f9d20f5db8b36d275fe65de43b95b090fc1.tar.bz2
Prepare for Signature Version 4.
* lib/hmac_sha256.c: New file. * lib/sha256.c: New file. * lib/sha256.h: New file. * lib/Makefile.am (libeclat_a_SOURCES): Add new files. * lib/libeclat.h (hmac_sha256): New proto. (eclat_query_signature): Rename to eclat_query_sign, take signature version as argument. (eclat_encode_devmap): Remove prototype. * lib/reqsign.c: Use HMAC256 * src/config.c (eclat_kw): New keyword: signature-version, * src/devmap.c (eclat_encode_devmap): Bugfixes. Translate snapshot ids. * src/eclat.c (signature_version): New variable. * src/eclat.h (signature_version): New proto. (eclat_encode_devmap): New proto. * src/util.c (eclat_send_query): Use eclat_query_sign. * tests/hmac01.at: Update. * tests/hmac02.at: Update. * tests/hmac03.at: Update. * tests/thmac.c: Use HMAC256
Diffstat (limited to 'lib/libeclat.h')
-rw-r--r--lib/libeclat.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libeclat.h b/lib/libeclat.h
index 0e8868b..32deba3 100644
--- a/lib/libeclat.h
+++ b/lib/libeclat.h
@@ -54,6 +54,10 @@ int debug_register(char *name);
void hmac_sha1(const void *text, size_t textlen,
const void *key, size_t keylen,
void *digest);
+void hmac_sha256(const void *text, size_t textlen,
+ const void *key, size_t keylen,
+ void *digest);
+
void urlencode(const char *input, size_t len,
char **poutput, size_t *poutlen);
@@ -88,14 +92,12 @@ void eclat_query_free(struct ec2_query *);
void eclat_query_add_param(struct ec2_query *q, const char *name,
const char *value);
-void eclat_query_signature(struct ec2_query *req, char *secret);
+void eclat_query_sign(struct ec2_query *req, char *secret, char *version);
char *eclat_query_to_url(struct ec2_query *req, char **post_params);
void eclat_query_encode(struct ec2_query *q);
-void eclat_encode_devmap(struct ec2_query *q, struct grecs_list *list);
-
typedef struct eclat_partial_tree *eclat_partial_tree_t;

Return to:

Send suggestions and report system problems to the System administrator.