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

Backport 2.x: Fix psa_generate_key(): return PSA_ERROR_INVALID_ARGUMENT for public key #5037 #5038

Merged
merged 6 commits into from
Oct 18, 2021

Conversation

mprse
Copy link
Contributor

@mprse mprse commented Oct 7, 2021

Description

Backport for PR #5037.

Status

READY

mprse added 2 commits October 7, 2021 12:40
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
@mprse mprse added needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Oct 7, 2021
mprse added 3 commits October 8, 2021 12:56
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

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

This is a straight backport of #5037. It looks good to me except that one thing needs to be different from the original: in 2.x, the generated source files are checked into git, so you need to run tests/scripts/check-generated-files.sh -u and commit the result. (This should resolve most of the CI failures.)

Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
@mprse
Copy link
Contributor Author

mprse commented Oct 12, 2021

Re-generated and committed tests/suites/test_suite_psa_crypto_not_supported.generated.data.

@gilles-peskine-arm gilles-peskine-arm added needs-ci Needs to pass CI tests single-reviewer This PR qualifies for having only one reviewer and removed needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Oct 12, 2021
@gilles-peskine-arm gilles-peskine-arm added approved Design and code approved - may be waiting for CI or backports and removed needs-ci Needs to pass CI tests labels Oct 18, 2021
@gilles-peskine-arm gilles-peskine-arm merged commit e4739ab into Mbed-TLS:development_2.x Oct 18, 2021
bensze01 added a commit to bensze01/psa-arch-tests that referenced this pull request Nov 8, 2021
Test psa_generate_key with RSA 2048 Public key

Changed the error code from PSA_ERROR_NOT_SUPPORTED to
PSA_ERROR_INVALID_ARGUMENT as in the documentation of
psa_generate_key() returned values:
"PSA_ERROR_INVALID_ARGUMENT The key type is an asymmetric public key type."

See:
Mbed-TLS/mbedtls#4551
Mbed-TLS/mbedtls#5037
Mbed-TLS/mbedtls#5038

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
bensze01 added a commit to bensze01/psa-arch-tests that referenced this pull request Nov 10, 2021
Test psa_generate_key with RSA 2048 Public key

Changed the error code from PSA_ERROR_NOT_SUPPORTED to
PSA_ERROR_INVALID_ARGUMENT as in the documentation of
psa_generate_key() returned values:
"PSA_ERROR_INVALID_ARGUMENT The key type is an asymmetric public
key type."

See:
Mbed-TLS/mbedtls#4551
Mbed-TLS/mbedtls#5037
Mbed-TLS/mbedtls#5038

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
bensze01 added a commit to bensze01/psa-arch-tests that referenced this pull request Jan 12, 2022
Test psa_generate_key with RSA 2048 Public key

Changed the error code from PSA_ERROR_NOT_SUPPORTED to
PSA_ERROR_INVALID_ARGUMENT as in the documentation of
psa_generate_key() returned values:
"PSA_ERROR_INVALID_ARGUMENT The key type is an asymmetric public
key type."

See:
Mbed-TLS/mbedtls#4551
Mbed-TLS/mbedtls#5037
Mbed-TLS/mbedtls#5038

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports single-reviewer This PR qualifies for having only one reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants