Skip to content

Commit

Permalink
Merge pull request #6 from scheibling/main
Browse files Browse the repository at this point in the history
Ignore extra options passed to the sign function if not supported (temporary fix for the RSA hash_alg being passed to other types' sign functions)
  • Loading branch information
scheibling authored Jun 23, 2022
2 parents 263e268 + 91ddf34 commit ee9f304
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sshkey_tools/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ def from_decode(cls, data: bytes) -> Tuple["RSASignatureField", bytes]:
data,
)

def sign(self, data: bytes, hash_alg: RsaAlgs = RsaAlgs.SHA256) -> None:
def sign(self, data: bytes, hash_alg: RsaAlgs = RsaAlgs.SHA256, **kwargs) -> None:
"""
Signs the provided data with the provided private key
Expand Down Expand Up @@ -1436,7 +1436,7 @@ def from_decode(cls, data: bytes) -> Tuple["DSASignatureField", bytes]:

return cls(private_key=None, signature=signature), data

def sign(self, data: bytes) -> None:
def sign(self, data: bytes, **kwargs) -> None:
"""
Signs the provided data with the provided private key
Expand Down Expand Up @@ -1535,7 +1535,7 @@ def from_decode(cls, data: bytes) -> Tuple["ECDSASignatureField", bytes]:
data,
)

def sign(self, data: bytes) -> None:
def sign(self, data: bytes, **kwargs) -> None:
"""
Signs the provided data with the provided private key
Expand Down Expand Up @@ -1612,7 +1612,7 @@ def from_decode(cls, data: bytes) -> Tuple["ED25519SignatureField", bytes]:

return cls(private_key=None, signature=signature), data

def sign(self, data: bytes) -> None:
def sign(self, data: bytes, **kwargs) -> None:
"""
Signs the provided data with the provided private key
Expand Down

0 comments on commit ee9f304

Please sign in to comment.