ahknight / httpsig

HTTP Signature for Python
https://datatracker.ietf.org/doc/draft-cavage-http-signatures/
MIT License
36 stars 20 forks source link

hs2019 with PSS support #22

Open fulder opened 4 years ago

fulder commented 4 years ago

Implement support for new hs2019 algorithm together with PSS digital signature algorithm in order to follow the latest v12 draft

As the digital signature algorithm should now be derived from the keyId both the Signer and Verifier classes are now accepting a new (optional) sign_algorithm parameter which should be a subclass of the new SignAlgorithm superclass. This way we can easy add support for other digital signature algorithms by adding a custom class (implementing the sign and verify functions).

This has been implemented in parallel with the previously accepted algorithms (e.g. rsa-sha256). This means these algorithms are still supported although a deprecation message is now printed while they are used and they should probably be removed in next major release of this library (together with some cleanup of the 'old' code).

The test_signature tests has been updated to the new hs2019 with one test left for the deprecated rsa-sha256. The README file has also been updated with the new algorithm.

McLoone commented 4 years ago

+1