Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 870705b

Browse files
author
Daniel Hiltgen
committed
Caller of check_signature expects a bool
The recent changes to the underlying RSA library has changed the way verify works. Verify now returns a 1 for success, yet callers to check_signature were expecting a boolean. Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
1 parent ca53d72 commit 870705b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker_registry/toolkit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def check_signature():
253253
['{}:{}'.format(k, headers[k]) for k in header_keys])
254254
logger.debug('Signed message: {}'.format(message))
255255
try:
256-
return pkey.verify(message_digest(message), sigdata, 'sha1')
256+
return pkey.verify(message_digest(message), sigdata, 'sha1') == 1
257257
except RSA.RSAError as e:
258258
logger.exception(e)
259259
return False

0 commit comments

Comments
 (0)