We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbf28ee commit 6de1c6cCopy full SHA for 6de1c6c
1 file changed
pymdoccbor/mso/issuer.py
@@ -101,7 +101,10 @@ def __init__(
101
102
alg_map = {"ES256": "sha256", "ES384": "sha384", "ES512": "sha512"}
103
104
- hashfunc = getattr(hashlib, alg_map.get(self.alg))
+ if self.alg not in alg_map:
105
+ raise ValueError(f"Unsupported algorithm: {self.alg}")
106
+
107
+ hashfunc = getattr(hashlib, alg_map[self.alg])
108
109
digest_cnt = 0
110
for ns, values in data.items():
0 commit comments