Skip to content

Add named constants for key types and signing schemes#1137

Open
PratGit1606 wants to merge 1 commit into
secure-systems-lab:mainfrom
PratGit1606:add-signer-constants
Open

Add named constants for key types and signing schemes#1137
PratGit1606 wants to merge 1 commit into
secure-systems-lab:mainfrom
PratGit1606:add-signer-constants

Conversation

@PratGit1606

@PratGit1606 PratGit1606 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #593

Adds securesystemslib/signer/_constants.py with named constants for all key types (KEY_TYPE_RSA, KEY_TYPE_ECDSA, KEY_TYPE_ED25519) and signing schemes (ECDSA_SHA2_NISTP256, RSASSA_PSS_SHA256, etc.).
All constants are exported from the public signer API.

Hardcoded strings replaced across _key.py, _crypto_signer.py, _gcp_signer.py, _hsm_signer.py, _azure_signer.py, _aws_signer.py, and __init__.py. GPG-specific strings left untouched (separate subsystem).

Verified: tox -e lint,py,purepy,py-no-gpg,py-test-gpg-fails all pass.

Note: I noticed the stale refactor-scheme-handling branch which touches some of the same files. That branch appears to predate the current signer API and was never merged. This PR targets the current main branch. Happy to rebase or adjust if there's overlap with any planned work.

@jku

jku commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

sorry, this has been sitting here for a while: I think it looks reasonable, I was just hoping to get the earlier #1123 merged before this. If it does not happen soon, I'll switch the order

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

signer: add constants for key types and signing schemes

2 participants