From d0d5faa75b8ec4581cf8bf1b8c7c7ad0f429235b Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Mon, 11 Jul 2011 14:02:18 +0200 Subject: [PATCH] feature #618: econe EC2_SECRET_KEY sha1 instead of plain --- src/cloud/ec2/lib/EC2QueryClient.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cloud/ec2/lib/EC2QueryClient.rb b/src/cloud/ec2/lib/EC2QueryClient.rb index 0cbc7fdb54..f39e525741 100644 --- a/src/cloud/ec2/lib/EC2QueryClient.rb +++ b/src/cloud/ec2/lib/EC2QueryClient.rb @@ -48,7 +48,8 @@ module EC2QueryClient elsif ENV["EC2_ACCESS_KEY"] and ENV["EC2_SECRET_KEY"] ec2auth = [ENV["EC2_ACCESS_KEY"], ENV["EC2_SECRET_KEY"]] else - ec2auth=CloudClient::get_one_auth + ec2auth = CloudClient::get_one_auth + ec2auth[1] = Digest::SHA1.hexdigest(ec2auth[1]) end if !ec2auth @@ -56,7 +57,7 @@ module EC2QueryClient end @access_key_id = ec2auth[0] - @access_key_secret = Digest::SHA1.hexdigest(ec2auth[1]) + @access_key_secret = ec2auth[1] # Server location