Skip to content

Commit

Permalink
Fix pytools ECC key attribute name
Browse files Browse the repository at this point in the history
  • Loading branch information
cedelavergne-ledger committed Mar 21, 2024
1 parent 37f7ab8 commit 45512ca
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions pytools/gpgapp/gpgcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,9 +926,6 @@ def decode_attributes(self, key: str) -> str:
if not attributes or len(attributes) == 0:
return ""

if attributes[0] not in set(iter(PubkeyAlgo)):
return ""

if attributes[0] == PubkeyAlgo.RSA:
if attributes[5] == 0:
fmt = "standard (e, p, q)"
Expand All @@ -944,14 +941,12 @@ def decode_attributes(self, key: str) -> str:
return ret

if attributes[0] == PubkeyAlgo.ECDSA:
ret = "ECDSA"
return "ECDSA"
if attributes[0] == PubkeyAlgo.ECDH:
ret = "ECDH"
return "ECDH"
if attributes[0] == PubkeyAlgo.EDDSA:
ret = "EDDSA"
else:
ret = ""
return ret
return "EDDSA"
return ""


def decode_key(self, key: str) -> dict:
Expand Down

0 comments on commit 45512ca

Please sign in to comment.