aboutsummaryrefslogtreecommitdiff
path: root/src/eclat.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-07-09 13:01:57 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2014-07-09 23:20:17 +0300
commit131b6ab56cbec838346fd493f3fe96438e3b58e7 (patch)
tree1a30a33f6447fcbeba9810542121dc7003d3129a /src/eclat.c
parent7f40bb8674983f8e4fc11fbebe56f88daa812c1a (diff)
downloadeclat-131b6ab56cbec838346fd493f3fe96438e3b58e7.tar.gz
eclat-131b6ab56cbec838346fd493f3fe96438e3b58e7.tar.bz2
Implement signature version 4 signing process
* lib/libeclat.h (ec2_param) <encoded>: New member. (ec2_query) <signature>: Remove. <headers,region,access_key>: New members (eclat_query_create): Take two more arguments. All uses changed. (eclat_query_add_param_encoded) (eclat_query_add_header): New functions. * lib/q2url.c (eclat_query_to_url): Don't create Signature param: it is already in the param list (for v2 process). * lib/qaddparm.c (eclat_query_add_param_encoded): New function. (eclat_query_add_header): New function. * lib/qcreat.c (eclat_query_create): Take region and access key as additional parameters. * lib/qencode.c (encode_param): Skip parameters that have encoded set to true. * lib/reqsign.c (querysign2): Store access key in AWSAccessKeyId and the generated signature in the Signature parameters. (eclat_hex_encode): New function. (querysign4): Implement signature version 4 signing process. * src/ec2map.c: Update call to eclat_query_create. * src/eclat.c: Likewise. * src/util.c (eclat_send_query): Sign the query and add requested headers prior to sending. * doc/eclat.conf.5: Document signature-version. * NEWS: Likewise.
Diffstat (limited to 'src/eclat.c')
-rw-r--r--src/eclat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eclat.c b/src/eclat.c
index 3791573..566a5ba 100644
--- a/src/eclat.c
+++ b/src/eclat.c
@@ -644,7 +644,8 @@ eclat_do_command(eclat_command_env_t *env, struct eclat_command *command,
if (!(command->flags & CMD_NOQRY)) {
env->query = eclat_query_create(use_ssl ? EC2_QF_HTTPS : 0,
- endpoint, "/");
+ endpoint, "/",
+ region_name, access_key);
}
if (command->tag)

Return to:

Send suggestions and report system problems to the System administrator.