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

Improve mandatory Provide methods #321

Merged
merged 1 commit into from
Jan 21, 2021

Conversation

ionut-arm
Copy link
Member

@ionut-arm ionut-arm commented Jan 19, 2021

This commit changes the way some methods on the Provide trait are
implemented. Given that in some cases the methods must be implemented
by the providers (such as list_keys), there should be no default
implementation for them and the tests must verify that they operate
correctly.

Fixes #312

@ionut-arm ionut-arm added the code health Issues concerning overall code quality, safety and best practice label Jan 19, 2021
@ionut-arm ionut-arm requested a review from hug-dev January 19, 2021 14:14
@ionut-arm ionut-arm self-assigned this Jan 19, 2021
@ionut-arm ionut-arm force-pushed the list-keys branch 2 times, most recently from a504f8a to d4bc02f Compare January 19, 2021 15:34
Copy link
Member

@hug-dev hug-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! And thank you for improving the tests as well.

Should that close #312 ?

client.generate_rsa_sign_key(key2.clone()).unwrap();
client.set_provider(ProviderID::Tpm);
client.generate_rsa_sign_key(key3.clone()).unwrap();
let providers = client.list_providers().expect("Failed to list providers");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's awesome!
This snippet shows the power of Parsec actually

This commit changes the way some methods on the Provide trait are
implemented. Given that in some cases the methods _must_ be implemented
by the providers (such as `list_keys`), there should be no default
implementation for them and the tests must verify that they operate
correctly.

Signed-off-by: Ionut Mihalcea <ionut.mihalcea@arm.com>
@ionut-arm ionut-arm merged commit 2ce6169 into parallaxsecond:master Jan 21, 2021
@ionut-arm ionut-arm deleted the list-keys branch January 21, 2021 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Issues concerning overall code quality, safety and best practice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve default implementation issue for list_keys in Provide
2 participants