Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TypeError: ECPrivateKey.sign() got an unexpected keyword argument 'signature_algorithm' #10237

Closed
lucas-mmb opened this issue Jan 23, 2024 · 2 comments
Labels

Comments

@lucas-mmb
Copy link

The imgtool script I was using to sign some firmware images broke in the pipeline since updating to v42.
Earlier today it was working fine with cryptography-41.0.7

https://github.com/nrfconnect/sdk-mcuboot

File "/usr/local/lib/python3.10/dist-packages/imgtool/main.py", line 475, in sign
img.create(key, public_key_format, enckey, dependencies, boot_record,
File "/usr/local/lib/python3.10/dist-packages/imgtool/image.py", line 481, in create
sig = key.sign(bytes(self.payload))
File "/usr/local/lib/python3.10/dist-packages/imgtool/keys/ecdsa.py", line 208, in sign
sig = self.raw_sign(payload)
File "/usr/local/lib/python3.10/dist-packages/imgtool/keys/ecdsa.py", line 203, in raw_sign
return self.key.sign(
TypeError: ECPrivateKey.sign() got an unexpected keyword argument 'signature_algorithm'

@reaperhulk
Copy link
Member

Thanks for the report, this is a bug we'll fix for 42.0.1 (we accidentally changed a kwarg and don’t appear to have a test for passing as kwarg)

alex added a commit to alex/cryptography that referenced this issue Jan 23, 2024
reaperhulk pushed a commit to reaperhulk/cryptography that referenced this issue Jan 23, 2024
alex added a commit that referenced this issue Jan 23, 2024
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
@moculll
Copy link

moculll commented Jan 25, 2024

Thanks for the report, this is a bug we'll fix for 42.0.1 (we accidentally changed a kwarg and don’t appear to have a test for passing as kwarg)

Thanks, dude, 42.0.1 works pretty well

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 25, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Development

No branches or pull requests

3 participants