Skip to content

Commit bc6f882

Browse files
authored
Merge pull request #814 from secure-systems-lab/dependabot/pip/test-and-lint-dependencies-39b6280e92
build(deps): bump pylint from 3.1.1 to 3.2.2 in the test-and-lint-dependencies group
2 parents 323d572 + f61cf1a commit bc6f882

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

requirements-lint.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mypy==1.10.0
22
black==24.4.2
33
isort==5.13.2
4-
pylint==3.1.1
4+
pylint==3.2.2
55
bandit==1.7.8

securesystemslib/signer/_gcp_signer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,18 @@ def _get_hash_algorithm(public_key: Key) -> str:
165165
if public_key.keytype == "rsa":
166166
# hash algorithm is encoded as last scheme portion
167167
algo = public_key.scheme.split("-")[-1]
168-
if public_key.keytype in [
168+
elif public_key.keytype in [
169169
"ecdsa",
170170
"ecdsa-sha2-nistp256",
171171
"ecdsa-sha2-nistp384",
172172
]:
173173
# nistp256 uses sha-256, nistp384 uses sha-384
174174
bits = public_key.scheme.split("-nistp")[-1]
175175
algo = f"sha{bits}"
176+
else:
177+
raise exceptions.UnsupportedAlgorithmError(
178+
f"Unsupported key type {public_key.keytype} in key {public_key.keyid}"
179+
)
176180

177181
# trigger UnsupportedAlgorithm if appropriate
178182
_ = sslib_hash.digest(algo)

0 commit comments

Comments
 (0)