Skip to content

e2e_test: Add key type info to load_keys #41

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 15, 2024
Merged

Conversation

gowthamsk-arm
Copy link
Collaborator

The load_key function currently uses RSA key type by default which is a bug. This patch adds an argument to the function to enable using key type of choice.

Signed-off-by: Gowtham Suresh Kumar gowtham.sureshkumar@arm.com

@gowthamsk-arm gowthamsk-arm added the bug Something isn't working label Apr 12, 2024
@gowthamsk-arm gowthamsk-arm self-assigned this Apr 12, 2024
@@ -47,7 +47,7 @@ fn test_loading_keys() {
let mut param = ossl_param!(PARSEC_PROVIDER_KEY_NAME, OSSL_PARAM_UTF8_PTR, my_key_name);
unsafe {
let mut parsec_pkey: *mut EVP_PKEY = std::ptr::null_mut();
load_key(&lib_ctx, &mut param, &mut parsec_pkey);

Choose a reason for hiding this comment

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

Can we test loading both instead? (We should be freeing both as well)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will add it

The load_key function currently uses RSA key type by default which
is a bug. This patch adds an argument to the function to enable
using key type of choice.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
This patch moves the tests related to keys to a separate module.
Also adds a test to load an ECDSA key from the parsec provider.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Copy link
Member

@tgonzalezorlandoarm tgonzalezorlandoarm left a comment

Choose a reason for hiding this comment

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

LGTM

@gowthamsk-arm gowthamsk-arm merged commit a9b8832 into main Apr 15, 2024
@tgonzalezorlandoarm tgonzalezorlandoarm deleted the gsk/fix_loadkey branch April 16, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants