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

support in more types then just RSA_KEYPAIR #9755

Merged
merged 1 commit into from Feb 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -1125,18 +1125,13 @@ psa_status_t psa_generate_key(psa_key_handle_t key_handle,
in_vec[1].base = &bits;
in_vec[1].len = sizeof(size_t);

/* currently the parameter argument is used only for RSA keypair
and ignored in other cases. support for other algorithms
may be added later*/
if (PSA_KEY_TYPE_RSA_KEYPAIR == type) {
in_vec[2].base = parameters;
/* size of parameter is unsigned integer as defined in header */
in_vec[2].len = parameters_size;
} else { // currenty ignored for non RSA case
in_vec[2].base = NULL;
in_vec[2].len = 0;
if (((parameters == NULL) && (parameters_size != 0)) || ((parameters != NULL) && (parameters_size == 0))) {
return (PSA_ERROR_INVALID_ARGUMENT);
}

in_vec[2].base = parameters;
in_vec[2].len = parameters_size;

handle = psa_connect(PSA_KEY_MNG_ID, MINOR_VER);
if (handle <= 0) {
return (PSA_ERROR_COMMUNICATION_FAILURE);
Expand Down