You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+message['SignatureVersion']+' is not supported.'));
@@ -99,7 +99,7 @@ var validateSignature = function (message, cb) {
99
99
for(vari=0;i<signableKeys.length;i++){
100
100
if(signableKeys[i]inmessage){
101
101
verifier.update(signableKeys[i]+"\n"
102
-
+message[signableKeys[i]]+"\n");
102
+
+message[signableKeys[i]]+"\n",encoding);
103
103
}
104
104
}
105
105
@@ -123,8 +123,9 @@ var validateSignature = function (message, cb) {
123
123
* @constructor
124
124
* @param {RegExp} [hostPattern=/^sns\.[a-zA-Z0-9\-]{3,}\.amazonaws\.com(\.cn)?$/] - A pattern used to validate that a message's certificate originates from a trusted domain.
125
125
*/
126
-
functionMessageValidator(hostPattern){
126
+
functionMessageValidator(hostPattern,encoding){
127
127
this.hostPattern=hostPattern||defaultHostPattern;
128
+
this.encoding=encoding;
128
129
}
129
130
130
131
/**
@@ -156,7 +157,7 @@ MessageValidator.prototype.validate = function (hash, cb) {
0 commit comments