Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
m32 committed Mar 5, 2024
1 parent bf13a40 commit 76d5266
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion endesive/signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ def sign(
)
else:
md = getattr(hashes, hashalgo.upper())
if isinstance(key, keys.PrivateKeyInfo):
if hsm is not None:
salt_length = md.digest_size
elif isinstance(key, keys.PrivateKeyInfo):
salt_length = key.byte_size - md.digest_size - 2
salt_length = md.digest_size
else:
Expand Down

0 comments on commit 76d5266

Please sign in to comment.