-
-
Notifications
You must be signed in to change notification settings - Fork 694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error messages when missing cryptography package #231
Changes from all commits
62c0897
b83d6e1
2fec851
31494c9
8520c8f
0550fa3
2a09da2
439f9a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,5 +131,6 @@ def main(): | |
else: | ||
p.print_help() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,9 @@ | |
except ImportError: | ||
has_crypto = False | ||
|
||
requires_cryptography = set(['RS256', 'RS384', 'RS512', 'ES256', 'ES384', | ||
'ES521', 'ES512', 'PS256', 'PS384', 'PS512']) | ||
|
||
|
||
def get_default_algorithms(): | ||
""" | ||
|
@@ -171,6 +174,7 @@ def sign(self, msg, key): | |
def verify(self, msg, key, sig): | ||
return constant_time_compare(sig, self.sign(msg, key)) | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another extra space? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This (and the other extra space) was to fix flake8 errors reported by the tests. It seemed to be failing to pass without the changes (but maybe that was just a local configuration on my box) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. er. Extra newline, not extra space. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's possible our |
||
if has_crypto: | ||
|
||
class RSAAlgorithm(Algorithm): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you might have added an extra space here?