self.signer.get_signature_mechanism(None).hash_algo #115
-
I am getting this error and don't know how to solve it :( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sooo, I'm seeing a complaint about an error, but no stack trace... ;) In all seriousness, Can you post a stack trace, preferably with some sample code? |
Beta Was this translation helpful? Give feedback.
Sooo, I'm seeing a complaint about an error, but no stack trace... ;)
In all seriousness,
get_signature_mechanism(...).hash_algo
is called withNone
if you don't explicitly tell pyHanko what digest algorithm to use. PyHanko will try to derive the hash algorithm from the declared signature mechanism, but if that's also not explicitly specified, it will try to make a reasonable guess based on the signer certificate's public key. It's not particularly clever about that, though, and that will fail if there's no "obvious" choice.Can you post a stack trace, preferably with some sample code?