| Index: boto/mturk/notification.py
|
| diff --git a/boto/mturk/notification.py b/boto/mturk/notification.py
|
| index 2aa99ca47b9d0a83345f99479ff772c6246a98dd..02c93aab14d4ebb519d73e536fd3f365929f794a 100644
|
| --- a/boto/mturk/notification.py
|
| +++ b/boto/mturk/notification.py
|
| @@ -74,9 +74,18 @@ class NotificationMessage:
|
| def verify(self, secret_key):
|
| """
|
| Verifies the authenticity of a notification message.
|
| +
|
| + TODO: This is doing a form of authentication and
|
| + this functionality should really be merged
|
| + with the pluggable authentication mechanism
|
| + at some point.
|
| """
|
| - verification_input = NotificationMessage.SERVICE_NAME + NotificationMessage.OPERATION_NAME + self.timestamp
|
| - signature_calc = self._auth_handler.sign_string(verification_input)
|
| + verification_input = NotificationMessage.SERVICE_NAME
|
| + verification_input += NotificationMessage.OPERATION_NAME
|
| + verification_input += self.timestamp
|
| + h = hmac.new(key=secret_key, digestmod=sha)
|
| + h.update(verification_input)
|
| + signature_calc = base64.b64encode(h.digest())
|
| return self.signature == signature_calc
|
|
|
| class Event:
|
|
|