From c41f2a347e4d875ff2b43a16e82e1ac61484218f Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Tue, 27 Aug 2024 13:09:57 +0200 Subject: [PATCH] unhexlify already part of hasher.unlock --- src/eduid/vccs/server/run.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/eduid/vccs/server/run.py b/src/eduid/vccs/server/run.py index 645436a1b..d277b1cf7 100644 --- a/src/eduid/vccs/server/run.py +++ b/src/eduid/vccs/server/run.py @@ -1,6 +1,5 @@ import sys from asyncio import Lock -from binascii import unhexlify from typing import Any, Mapping, Optional from fastapi import FastAPI @@ -21,7 +20,7 @@ class VCCS_API(FastAPI): - def __init__(self, test_config: Optional[Mapping[str, Any]] = None): + def __init__(self, test_config: Optional[Mapping[str, Any]] = None) -> None: print("vccs_api is starting", file=sys.stderr) super().__init__() @@ -34,7 +33,7 @@ def __init__(self, test_config: Optional[Mapping[str, Any]] = None): name=self.state.config.yhsm_device, lock=yhsm_lock, debug=self.state.config.yhsm_debug ) if self.state.config.yhsm_unlock_password: - self.state.hasher.unlock(unhexlify(self.state.config.yhsm_unlock_password)) + self.state.hasher.unlock(self.state.config.yhsm_unlock_password) self.state.kdf = ndnkdf.NDNKDF()