Skip to content

Commit 7817755

Browse files
committed
Fixed ECDSA-SHA256 fragment string
Signed-off-by: kimbeelen <[email protected]>
1 parent 896fdac commit 7817755

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

openleadr/messaging.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def parse_message(data):
6464

6565
def load_private_key(key_data, passphrase=None):
6666
"""
67-
Load the key based on key data. .pem and .der keys can be loaded.
67+
Load the key based on key data. Supports .pem and .der keys.
68+
6869
Returns a private key object.
6970
"""
7071
passphrase_bytes = passphrase.encode() if passphrase else None
@@ -92,7 +93,7 @@ def get_signature_algorithm_from_private_key(key_data, passphrase=None, default_
9293
elif isinstance(key, dsa.DSAPrivateKey):
9394
return "dsa-sha256"
9495
elif isinstance(key, ec.EllipticCurvePrivateKey):
95-
return "ecdsa-sha-256"
96+
return "ecdsa-sha256"
9697
elif isinstance(key, ed25519.Ed25519PrivateKey):
9798
logger.warning("ED25519 keys are not supported")
9899
elif isinstance(key, ed448.Ed448PrivateKey):

0 commit comments

Comments
 (0)