Return right error code. #199

Merged
jainvikas8 merged 1 commit from dev/jainvikas8/fix-return-code into development 2019-08-02 09:07:47 -05:00
jainvikas8 commented 2019-08-02 08:21:23 -05:00 (Migrated from github.com)

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.

Fixes : [#126](https://github.com/ARMmbed/mbed-crypto/issues/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 * [Jenkins failed job](https://jenkins-internal.mbed.com/blue/organizations/jenkins/mbed-crypto-pr-ci-testing/detail/dev%2Fjainvikas8%2Fci-testing-development/1/pipeline/41) * [Jenkins passed job](https://jenkins-internal.mbed.com/blue/organizations/jenkins/mbed-crypto-pr-ci-testing/detail/dev%2Fjainvikas8%2Fci-testing-development/2/pipeline/41) Further, the test can be run on your local Linux machine with the help of this [script](https://gist.github.com/jainvikas8/5d02731a487cdfd87d0633c01c260390). 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.
gilles-peskine-arm (Migrated from github.com) approved these changes 2019-08-02 08:31:36 -05:00
gilles-peskine-arm (Migrated from github.com) left a comment

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 https://github.com/ARMmbed/mbed-crypto/issues/200

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 https://github.com/ARMmbed/mbed-crypto/issues/200
yanesca (Migrated from github.com) approved these changes 2019-08-02 08:37:04 -05:00
yanesca (Migrated from github.com) left a comment

LGTM

LGTM
gilles-peskine-arm commented 2019-08-02 09:06:58 -05:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-ARMmbed/mbed-crypto!199
No description provided.