Skip to content

Commit b9a9050

Browse files
minor comments
Signed-off-by: Trishank Karthik Kuppusamy <[email protected]>
1 parent f5eb59b commit b9a9050

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

tests/test_tuf_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ def test(key_type, hash_algorithm, hash_algorithms):
307307
)
308308

309309
# FIXME: Unfortunately, py-TUF does not yet support P-384.
310+
# https://github.com/hvac/hvac/pull/606
310311
# test(
311312
# VaultKey.KeyTypes.P_384.value,
312313
# VaultKey.HashAlgorithms.SHA2_384.value,
@@ -336,8 +337,8 @@ def test_VaultKey_RSA(self):
336337

337338
for key_type in {
338339
VaultKey.KeyTypes.RSA_2048.value,
339-
# FIXME: https://github.com/hvac/hvac/issues/605
340-
#VaultKey.KeyTypes.RSA_3072.value,
340+
# https://github.com/hvac/hvac/issues/605
341+
VaultKey.KeyTypes.RSA_3072.value,
341342
VaultKey.KeyTypes.RSA_4096.value
342343
}:
343344
NAME = f'test-{key_type}-key'

tuf/api/keys.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ def __init__(
308308
if not self.__client.is_authenticated():
309309
raise self.AuthenticationError
310310

311-
# Guess why this isn't a requests.Response?
312-
# https://github.com/hvac/hvac/pull/537#issuecomment-660304707
311+
# https://github.com/hvac/hvac/issues/604
313312
response = self.__client.secrets.transit.read_key(name=name)
314313
self.__name = name
315314

@@ -324,8 +323,6 @@ def __init__(
324323
# NOTE: The documentation is not clear, but presumably the returned
325324
# keys are different versions of keys under the same name. Therefore,
326325
# we shall select the one with the latest version number.
327-
# NOTE: We are also taking it for granted that Vault will generate
328-
# public keys in formats TUF will recognize out of the box.
329326
keys = data['keys']
330327
latest_version = data['latest_version']
331328
key = keys.get(str(latest_version))
@@ -420,6 +417,7 @@ def verify(self, signed: BytesOrStr, signature: Dict) -> bool:
420417
self.KeyTypes.RSA_3072.value,
421418
self.KeyTypes.RSA_4096.value
422419
} and self.__signature_algorithm == self.SignatureAlgorithms.PSS.value:
420+
# https://github.com/secure-systems-lab/securesystemslib/pull/262
423421
return self.__ram_key._verify_rsa_signature(
424422
signed,
425423
signature,

0 commit comments

Comments
 (0)