Skip to content

Keymgmt import: Add a key presence check #34

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

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

tgonzalezorlandoarm
Copy link
Member

The kmgmt_import function loads certain data in the keydata.
Before doing this, check if the reffered to key is present in the provider.

Depends on #29

@tgonzalezorlandoarm tgonzalezorlandoarm self-assigned this Apr 8, 2024
@tgonzalezorlandoarm tgonzalezorlandoarm force-pushed the tg/keymgmt-import-extended branch 2 times, most recently from c49e476 to 0caa8ce Compare April 10, 2024 13:41
@tgonzalezorlandoarm tgonzalezorlandoarm marked this pull request as ready for review April 10, 2024 13:41
if keys.iter().any(|kinfo| kinfo.name == key_name) {
Ok(OPENSSL_SUCCESS)
} else {
Err("Failed to list Parsec Provider's Keys".into())
Copy link
Collaborator

Choose a reason for hiding this comment

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

The error log should rather be,
"Key is not existing in the Parsec Service"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

The kmgmt_import function loads certain data in the keydata.
Before doing this, check if the reffered to key is present in the
provider.

Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
@tgonzalezorlandoarm tgonzalezorlandoarm force-pushed the tg/keymgmt-import-extended branch from 0caa8ce to 325e75b Compare April 10, 2024 16:08
@gowthamsk-arm gowthamsk-arm merged commit 7c43303 into main Apr 10, 2024
@tgonzalezorlandoarm tgonzalezorlandoarm deleted the tg/keymgmt-import-extended branch April 11, 2024 09:12
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.

2 participants