From ee7e6ccacec72cb575ff5dc2f5c5895509625196 Mon Sep 17 00:00:00 2001 From: PatStLouis Date: Thu, 26 Sep 2024 16:04:47 +0000 Subject: [PATCH] fix askar Signed-off-by: PatStLouis --- aries_cloudagent/wallet/askar.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/aries_cloudagent/wallet/askar.py b/aries_cloudagent/wallet/askar.py index bc37833749..ee932a146b 100644 --- a/aries_cloudagent/wallet/askar.py +++ b/aries_cloudagent/wallet/askar.py @@ -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) @@ -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: