Skip to content

self.signer.get_signature_mechanism(None).hash_algo #115

Discussion options

You must be logged in to vote

Sooo, I'm seeing a complaint about an error, but no stack trace... ;)

In all seriousness, get_signature_mechanism(...).hash_algo is called with None 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?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Vishwamithra37
Comment options

Answer selected by Vishwamithra37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants