Skip to content

Return right error code. #199

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

Conversation

jainvikas8
Copy link
Contributor

Fixes : #126

When running psa-arch-tests API - 0.9 on the crypto library one of the tests fails which expects a right return code from psa_asymmetric_encrypt when the size of output buffer supplied is inadequate.

These psa-arch-tests are PSA compliance tests which are run against the mbed-crypto library.

Please refer

Further, the test can be run on your local Linux machine with the help of this script.

So returning PSA_ERROR_BUFFER_TOO_SMALL error code passes this test.

This fix is a pre-requisite to make psa-arch-tests run as a CI for any raised PR job.

Issue : 126
ARMmbed#126

PSA_ERROR_BUFFER_TOO_SMALL error returned when we check for output_size.
Copy link
Collaborator

@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.

Normally I'd ask for a non-regression test, but this is an area that isn't well-tested in the first place, so this can wait. Tracking the lack of testing at #200

@gilles-peskine-arm gilles-peskine-arm added bug Something isn't working needs: ci Needs a passing full CI run labels Aug 2, 2019
Copy link
Collaborator

@yanesca yanesca left a comment

Choose a reason for hiding this comment

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

LGTM

@gilles-peskine-arm
Copy link
Collaborator

CI failed only due to a known issue with the ABI checking script, and there's obviously no ABI change here, so it's as good as a pass.

@gilles-peskine-arm gilles-peskine-arm merged commit e3223d1 into ARMmbed:development Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs: ci Needs a passing full CI run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

psa_asymmetric_encrypt doesn't returns PSA_ERROR_BUFFER_TOO_SMALL
3 participants