Skip to content

Commit

Permalink
Add workaround for old specification files
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfett committed May 15, 2024
1 parent b3ac23f commit 367b02d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/sd_jwt/utils/demo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ def load_yaml_settings(file):
if property not in settings:
sys.exit(f"Settings file must define '{property}'.")

# 'issuer_key' can be used instead of 'issuer_keys' in the key settings; will be converted to an array anyway
if "issuer_key" in settings["key_settings"]:
if "issuer_keys" in settings["key_settings"]:
sys.exit("Settings file cannot define both 'issuer_key' and 'issuer_keys'.")

settings["key_settings"]["issuer_keys"] = [settings["key_settings"]["issuer_key"]]

return settings


Expand Down

0 comments on commit 367b02d

Please sign in to comment.