Skip to content

Commit 94f805e

Browse files
committed
ValueError can happen both during signing (e.g., with malformed DSA keys) and pubkey extraction
1 parent 5527455 commit 94f805e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

keyvalidator

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ def checkkeyobj(priv):
1919
alg = ec.ECDSA(hashes.SHA256())
2020
else:
2121
alg = hashes.SHA256()
22-
sig = priv.sign(b"2u_Yg7", alg)
2322
try:
23+
sig = priv.sign(b"2u_Yg7", alg)
2424
pubkey = priv.public_key()
2525
except ValueError:
2626
return True

0 commit comments

Comments
 (0)