From 0783e7fb5a696251c93d2f1f270ad5bd7e8ee504 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 6 Jun 2024 14:15:48 +0200 Subject: [PATCH] fix new sign --- idhub/models.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/idhub/models.py b/idhub/models.py index d5ee958..3ac79e2 100644 --- a/idhub/models.py +++ b/idhub/models.py @@ -13,9 +13,8 @@ from pyvckit.did import ( generate_keys, generate_did, gen_did_document, - get_signing_key ) -from pyvckit.sign_vc import sign +from pyvckit.sign import sign from pyvckit.verify import verify_vc from oidc4vp.models import Organization @@ -692,10 +691,9 @@ class VerificableCredential(models.Model): self.hash = hashlib.sha3_256(self.render(domain).encode()).hexdigest() key = self.issuer_did.get_key_material() - signing_key = get_signing_key(key) credential = self.render(domain) - vc = sign(credential, signing_key, self.issuer_did.did) + vc = sign(credential, key, self.issuer_did.did) vc_str = json.dumps(vc) valid = verify_vc(vc_str)