Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor get_key and Key #89

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Refactor get_key and Key #89

merged 1 commit into from
Nov 17, 2023

Conversation

robin-nitrokey
Copy link
Member

This patch refactors get_key and Key to make it easier to use:

  • tags is changed from an Optional[list[str]] to a list[str] that is empty if no tags are set.
  • modulus, public_exponent and data are moved into the RsaPublicKey and EcPublicKey dataclasses so that only the fields for the selected key type are used.

Fixes: #88

This patch refactors get_key and Key to make it easier to use:
- tags is changed from an Optional[list[str]] to a list[str] that is
  empty if no tags are set.
- modulus, public_exponent and data are moved into the RsaPublicKey and
  EcPublicKey dataclasses so that only the fields for the selected key
  type are used.

Fixes: #88
@robin-nitrokey robin-nitrokey merged commit 1e91dcc into main Nov 17, 2023
6 checks passed
@robin-nitrokey robin-nitrokey deleted the get-key branch November 17, 2023 17:16
@q-nk
Copy link
Contributor

q-nk commented Nov 20, 2023

The test cases should be expanded to also cover EC and Generic keys.

@robin-nitrokey
Copy link
Member Author

#100

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.

Refactor get_key
2 participants