Skip to content

Commit 0fa6c6f

Browse files
committed
Add 'ecdsa' to the list of supported key types
Signed-off-by: Velichka Atanasova <avelichka@vmware.com>
1 parent 39ed706 commit 0fa6c6f

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

tuf/api/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ class Key:
415415
the metadata it is used in. This implementation does not verify
416416
that keyid is the hash of a specific representation of the key.
417417
keytype: A string denoting a public key signature system,
418-
such as "rsa", "ed25519", and "ecdsa-sha2-nistp256".
418+
such as "rsa", "ed25519", "ecdsa" and "ecdsa-sha2-nistp256".
419419
scheme: A string denoting a corresponding signature scheme. For example:
420420
"rsassa-pss-sha256", "ed25519", and "ecdsa-sha2-nistp256".
421421
keyval: A dictionary containing the public portion of the key.

tuf/client/updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ def _import_delegations(self, parent_role):
952952

953953
# Iterate the keys of the delegated roles of 'parent_role' and load them.
954954
for keyid, keyinfo in keys_info.items():
955-
if keyinfo['keytype'] in ['rsa', 'ed25519', 'ecdsa-sha2-nistp256']:
955+
if keyinfo['keytype'] in ['rsa', 'ed25519', 'ecdsa', 'ecdsa-sha2-nistp256']:
956956

957957
# We specify the keyid to ensure that it's the correct keyid
958958
# for the key.

tuf/keydb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
from tuf import formats
4646

4747
# List of strings representing the key types supported by TUF.
48-
_SUPPORTED_KEY_TYPES = ['rsa', 'ed25519', 'ecdsa-sha2-nistp256']
48+
_SUPPORTED_KEY_TYPES = ['rsa', 'ed25519', 'ecdsa', 'ecdsa-sha2-nistp256']
4949

5050
# See 'log.py' to learn how logging is handled in TUF.
5151
logger = logging.getLogger(__name__)

tuf/repository_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
TIMESTAMP_EXPIRES_WARN_SECONDS = 86400
7676

7777
# Supported key types.
78-
SUPPORTED_KEY_TYPES = ['rsa', 'ed25519', 'ecdsa-sha2-nistp256']
78+
SUPPORTED_KEY_TYPES = ['rsa', 'ed25519', 'ecdsa', 'ecdsa-sha2-nistp256']
7979

8080
# The algorithm used by the repository to generate the path hash prefixes
8181
# of hashed bin delegations. Please see delegate_hashed_bins()

tuf/scripts/repo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
# The supported keytype strings (as they appear in metadata) are listed here
184184
# because they won't necessarily match the key types supported by
185185
# securesystemslib.
186-
SUPPORTED_KEY_TYPES = ('ed25519', 'ecdsa-sha2-nistp256', 'rsa')
186+
SUPPORTED_KEY_TYPES = ('rsa', 'ed25519', 'ecdsa', 'ecdsa-sha2-nistp256')
187187

188188
# pylint: disable=protected-access
189189
# ... to allow use of sslib _generate_and_write_*_keypair convenience methods

0 commit comments

Comments
 (0)