Skip to content

Commit

Permalink
fix askar
Browse files Browse the repository at this point in the history
Signed-off-by: PatStLouis <[email protected]>
  • Loading branch information
PatStLouis committed Sep 26, 2024
1 parent fd2cdb0 commit ee7e6cc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions aries_cloudagent/wallet/askar.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,11 @@ async def get_signing_key(self, verkey: str) -> KeyInfo:
if not key:
raise WalletNotFoundError("Unknown key: {}".format(verkey))
metadata = json.loads(key.metadata or "{}")

kid = key.tags.get("kid")

try:
kid = key.tags.get("kid")
except:
kid = None

# FIXME implement key types
return KeyInfo(verkey=verkey, metadata=metadata, key_type=ED25519, kid=kid)
Expand Down Expand Up @@ -261,7 +264,7 @@ async def create_local_did(

try:
await self._session.handle.insert_key(
verkey, keypair, metadata=json.dumps(metadata), tags={"kid": None}
verkey, keypair, metadata=json.dumps(metadata)
)
except AskarError as err:
if err.code == AskarErrorCode.DUPLICATE:
Expand Down

0 comments on commit ee7e6cc

Please sign in to comment.