Hello
I'm trying to contact AWS API with D according to documentation:
http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html
there is written example in python which i want to rewrite to D:
http://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html
I want to ask
On 03/10/15 4:11 PM, holo wrote:
Hello
I'm trying to contact AWS API with D according to documentation:
http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html
there is written example in python which i want to rewrite to D:
http://docs.aws.amazon.com/general/latest/gr/sigv4-signed-re
On Saturday, 3 October 2015 at 03:15:21 UTC, Rikki Cattermole
wrote:
You could implement it yourself, (it looks pretty easy).
Or go the route of Botan:
https://github.com/etcimon/botan/blob/3bdc835d5b9bad7523deaa86fe98b1fbb2f09d6b/source/botan/mac/hmac.d
Thank you for answer. I used dub to f
On 03/10/15 4:54 PM, holo wrote:
On Saturday, 3 October 2015 at 03:15:21 UTC, Rikki Cattermole wrote:
You could implement it yourself, (it looks pretty easy).
Or go the route of Botan:
https://github.com/etcimon/botan/blob/3bdc835d5b9bad7523deaa86fe98b1fbb2f09d6b/source/botan/mac/hmac.d
Tha
On 03/10/15 6:01 PM, Rikki Cattermole wrote:
On 03/10/15 4:54 PM, holo wrote:
On Saturday, 3 October 2015 at 03:15:21 UTC, Rikki Cattermole wrote:
You could implement it yourself, (it looks pretty easy).
Or go the route of Botan:
https://github.com/etcimon/botan/blob/3bdc835d5b9bad7523deaa86fe
On Saturday, 3 October 2015 at 05:02:58 UTC, Rikki Cattermole
wrote:
On 03/10/15 6:01 PM, Rikki Cattermole wrote:
On 03/10/15 4:54 PM, holo wrote:
On Saturday, 3 October 2015 at 03:15:21 UTC, Rikki Cattermole
wrote:
You could implement it yourself, (it looks pretty easy).
Or go the route of B
On 04/10/15 1:09 AM, holo wrote:
On Saturday, 3 October 2015 at 05:02:58 UTC, Rikki Cattermole wrote:
On 03/10/15 6:01 PM, Rikki Cattermole wrote:
On 03/10/15 4:54 PM, holo wrote:
On Saturday, 3 October 2015 at 03:15:21 UTC, Rikki Cattermole wrote:
You could implement it yourself, (it looks
On Saturday, 3 October 2015 at 12:22:11 UTC, Rikki Cattermole
wrote:
On 04/10/15 1:09 AM, holo wrote:
On Saturday, 3 October 2015 at 05:02:58 UTC, Rikki Cattermole
wrote:
On 03/10/15 6:01 PM, Rikki Cattermole wrote:
On 03/10/15 4:54 PM, holo wrote:
[...]
By the looks of that error message w
On 04/10/15 1:49 AM, holo wrote:
On Saturday, 3 October 2015 at 12:22:11 UTC, Rikki Cattermole wrote:
On 04/10/15 1:09 AM, holo wrote:
On Saturday, 3 October 2015 at 05:02:58 UTC, Rikki Cattermole wrote:
On 03/10/15 6:01 PM, Rikki Cattermole wrote:
On 03/10/15 4:54 PM, holo wrote:
[...]
By
On Saturday, 3 October 2015 at 12:50:58 UTC, Rikki Cattermole
wrote:
On 04/10/15 1:49 AM, holo wrote:
On Saturday, 3 October 2015 at 12:22:11 UTC, Rikki Cattermole
wrote:
On 04/10/15 1:09 AM, holo wrote:
[...]
By the looks of things the problem is with SHA256, I'm
guessing it
doesn't have
On Saturday, 3 October 2015 at 03:11:06 UTC, holo wrote:
Hello
I'm trying to contact AWS API with D according to documentation:
[...]
check https://github.com/yannick/vibe-aws
it has v4 implemented
On Saturday, 3 October 2015 at 03:11:06 UTC, holo wrote:
Last but not least, how to write such function in D:
def sign(key, msg):
return hmac.new(key, msg.encode("utf-8"),
hashlib.sha256).digest()
?
I can't find in standard libraryt hmac function, is it existing?
The next version of D
On 04/10/15 2:31 AM, holo wrote:
On Saturday, 3 October 2015 at 12:50:58 UTC, Rikki Cattermole wrote:
On 04/10/15 1:49 AM, holo wrote:
On Saturday, 3 October 2015 at 12:22:11 UTC, Rikki Cattermole wrote:
On 04/10/15 1:09 AM, holo wrote:
[...]
By the looks of things the problem is with SHA25
On Saturday, 3 October 2015 at 23:58:39 UTC, Rikki Cattermole
wrote:
On 04/10/15 2:31 AM, holo wrote:
On Saturday, 3 October 2015 at 12:50:58 UTC, Rikki Cattermole
wrote:
On 04/10/15 1:49 AM, holo wrote:
On Saturday, 3 October 2015 at 12:22:11 UTC, Rikki
Cattermole wrote:
On 04/10/15 1:09 AM,
On Monday, 5 October 2015 at 19:43:39 UTC, holo wrote:
@Vladimir where can i check or do you know when next version of
phobos will be available?
You can use Digger to get the latest version of D:
https://github.com/CyberShadow/Digger
On Monday, 5 October 2015 at 21:00:38 UTC, Vladimir Panteleev
wrote:
On Monday, 5 October 2015 at 19:43:39 UTC, holo wrote:
@Vladimir where can i check or do you know when next version
of phobos will be available?
You can use Digger to get the latest version of D:
https://github.com/CyberShad
On 06/10/15 11:26 AM, holo wrote:
On Monday, 5 October 2015 at 21:00:38 UTC, Vladimir Panteleev wrote:
On Monday, 5 October 2015 at 19:43:39 UTC, holo wrote:
@Vladimir where can i check or do you know when next version of
phobos will be available?
You can use Digger to get the latest version
Congrats on getting it working!
@Rikki Thanks :)
I was trying to write my own lib from beginning based on examples
but after some time i resign from that idea (will back to it when
i will have some more experience) and right now im trying to
customize that one from link which yawniek paste:
On 07/10/15 3:18 PM, holo wrote:
Congrats on getting it working!
@Rikki Thanks :)
I was trying to write my own lib from beginning based on examples but
after some time i resign from that idea (will back to it when i will
have some more experience) and right now im trying to customize that one
I was fighting with it a little bit and after all i just leave
original function which was in code, removed dependencies from
vibe.d and finally tried to contact api. Here is my present code:
#!/usr/bin/rdmd -L-lcurl
import std.stdio;
import std.string;
import std.file;
import std.datetime;
im
On Friday, 9 October 2015 at 04:04:57 UTC, holo wrote:
r.dateString = client.addRequestHeader("Authoryzation:",
"AWS4-HMAC-SHA256" ~ " " ~ "Credential=" ~ accKey ~ "/" ~
xamztime ~ "/" ~ zone ~ "/" ~ service ~ "/" ~ "aws4_request" ~
", " ~ "SignedHeaders=" ~ "content-type;host;x-amz-date" ~
I correct typo (thats whats happening when you trying to solve
problem after night at 6:00 AM ).But still have same error. When
use curl with same generated creditentials im getting "400". What
is strange when im using same generated headers and signature
with command line curl im getting "500
I doped HTTP packets with wireshark, maybe that will be useful:
First recived:
Hypertext Transfer Protocol
HTTP/1.1 400 Bad Request\r\n
[Expert Info (Chat/Sequence): HTTP/1.1 400 Bad
Request\r\n]
Request Version: HTTP/1.1
Status Code: 400
Response Phrase:
On Friday, 9 October 2015 at 16:01:33 UTC, holo wrote:
Host:: ec2.amazonaws.com\r\n
This, ...
Content-Type:: application/x-www-form-urlencoded;
charset=utf-8\r\n
X-Amz-Date:: 20151009T174337Z\r\n
Authorization:: AWS4-HMAC-SHA256
Credential=AKIAIHGPAJQ2PJ47YKKA/20151009T17433
OK i find out error, in addRequestHeader i was using ":" after
header name what casing problem. I removed it and now im getting
"unauthorized". Here is how it looks right now:
HTTP/1.1 401 Unauthorized\r\n
[Expert Info (Chat/Sequence): HTTP/1.1 401
Unauthorized\r\n]
Request V
On Friday, 9 October 2015 at 16:30:26 UTC, holo wrote:
OK i find out error, in addRequestHeader i was using ":" after
header name what casing problem. I removed it and now im
getting "unauthorized". Here is how it looks right now:
HTTP/1.1 401 Unauthorized\r\n
[Expert Info (Chat/Seque
After long fight with previous code i try to rewrite "one-to-one"
python example from
http://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html (GET part) from begging to D with full success. Here is working code in clear D. Im using hmac function which is available from 2.0
On Sunday, 11 October 2015 at 23:16:51 UTC, holo wrote:
After long fight with previous code i try to rewrite
"one-to-one" python example from
http://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html (GET part) from begging to D with full success. Here is working code in cl
On Sunday, 11 October 2015 at 23:16:51 UTC, holo wrote:
auto hmac_sha256(ubyte[] key, ubyte[] msg)
{
auto hmac = hmac!SHA256(key);
hmac.put(msg);
auto digest = hmac.finish;
return digest;
}
alias sig
Thank you for info, i changed my code to use that build in
template and changed "cast(ubyte[]" to "xxx.representation" and
it is still working:
#!/usr/bin/rdmd -L-lcurl
module sigawsv4;
import std.stdio, std.process;
import std.digest.sha, std.digest.hmac;
import std.string;
import std.conv;
30 matches
Mail list logo