使用SignatureVersion = 2签署Amazon SQS查询[由OP解决] [英] Signing Amazon SQS Queries with SignatureVersion=2 [Solved by OP]

查看:109
本文介绍了使用SignatureVersion = 2签署Amazon SQS查询[由OP解决]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,

我正在用C ++ [1]开发一个Amazon Simple Message Queue应用程序,但在确定查询时必须签名的字符串时遇到了麻烦.我浏览过所有文档(尤其是),通过libAWS代码一窥(由于许可原因,我不能使用它),查看了其他语言的源代码,但看不到我做错了什么.我什至亲自运行了我认为创建签名字符串的算法,即使用OpenSSL和cURL命令行进行Base64和URL编码.

而不是让每个人都遇到诸如这里有一个URL"之类的问题,签名字符串是什么?任何人都可以将我指向某个应用程序,该应用程序可以确定任意查询URL的签名字符串应该是什么?

对于SignatureVersion = 1,有一个不错的JavaScript应用可供下载,但对于SignatureVersion = 2,我找不到类似的东西.

干杯,



[1]是的,我是受虐狂.但是只有当支付足够的时候.

PS:找出问题所在,我的签名字符串正确,我的URL编码正确,我的HmacSHA1正确,我的Base64编码器在... arrrggggghhhhh中添加了额外的换行符.我三天没发现它,因为我一直以为别人的代码是正确的!

Morning all,

I''m developing an Amazon Simple Message Queue app in C++ [1] and I''m having trouble working out what string I have to sign when I make a query. I''ve been through the docs (especially this), had a gawp through the libAWS code (which I can''t use because of licensing), looked at loads of source code in other languages and I can''t see what I''m doing incorrectly. I''ve even hand run what I think the algorithm for creating a signing string is using the OpenSSL and cURL command lines to do the Base64 and URL encoding.

Rather than bore everyone with questions like "here''s a URL, what''s the signing string?" can anyone point me at an app somewhere that works out what the signing string should be for an arbitrary query URL?

There''s a nice JavaScript app for download for SignatureVersion=1 but I can''t find anything like it for SignatureVersion=2.

Cheers,

Ash

[1] Yes I am a masochist. But only when paid enough.

PS: Found out what was wrong, my signing string was correct, my URL encoding was correct, my HmacSHA1 was correct, my Base64 encoder was chucking an extra newline in... arrrggggghhhhh. And I didn''t spot it for three days as I always assume other people''s code is correct!

推荐答案

回答仅从未答复的列表中删除-已解决通过OP.
Answered only to remove from unanswered list - solved by OP.


这篇关于使用SignatureVersion = 2签署Amazon SQS查询[由OP解决]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆