Skip to content
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

Issue with cryptography dependency declaration #305

Closed
prusse-martin opened this issue Sep 27, 2022 · 1 comment · Fixed by #306
Closed

Issue with cryptography dependency declaration #305

prusse-martin opened this issue Sep 27, 2022 · 1 comment · Fixed by #306

Comments

@prusse-martin
Copy link

The cryptography dependency is declared as cryptography >= 2.3, but jwcrypto no longer work with older cryptography.
I tested with cryptography ==2.3.1 and the error is displayed bellow.
In a quick check in the cryptography repo looks like SHA3_224 was add after 2.4, testing with 2.5 the import did work.

I suggest to update the dependency declaration.
I did not check if there are other problems due using older versions of cryptography.

W:\my\Projects
(jwcrypto-test) λ conda list cryp
# packages in environment at W:\my\envs\jwcrypto-test:
#
# Name                    Version                   Build  Channel
asn1crypto                1.5.1            py37haa95532_0    defaults
cryptography              2.3.1            py37h74b6da3_0    defaults
jwcrypto                  1.4.2              pyhd8ed1ab_0    https://conda.anaconda.org/conda-forge

W:\my\Projects
(jwcrypto-test) λ python -c "from jwcrypto import jwk"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "W:\my\envs\jwcrypto-test\lib\site-packages\jwcrypto\jwk.py", line 200, in <module>
    'sha3-224': hashes.SHA3_224(),
AttributeError: module 'cryptography.hazmat.primitives.hashes' has no attribute 'SHA3_224'
@simo5
Copy link
Member

simo5 commented Sep 27, 2022

Do you want to submit a PR to update the minimum dependency to a version that work ?

simo5 added a commit to simo5/jwcrypto that referenced this issue Sep 28, 2022
Fixes latchset#305

Signed-off-by: Simo Sorce <simo@redhat.com>
simo5 added a commit that referenced this issue Sep 28, 2022
Fixes #305

Signed-off-by: Simo Sorce <simo@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants