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

xtest regression case 4017 #741

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jenswi-linaro
Copy link
Contributor

Fix the AE cipher entry functions:
ta_entry_ae_update() - return TEE_AEUpdate() instead of TEE_SUCCESS
ta_entry_ae_{en,de}crypt_final() - handle NULL buffers

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
In ta_crypt_cmd_cipher_update(), ta_crypt_cmd_cipher_do_final(),
ta_crypt_cmd_ae_update(), ta_crypt_cmd_ae_encrypt_final(), and
ta_crypt_cmd_ae_decrypt_final(), always return out-buffer sizes even if
the function doesn't return TEEC_SUCCESS.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Add case 4017 "Test TEE Internal API Cipher block buffering". This test
tries to test the corner cases for Cipher and AE buffering.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Copy link
Contributor

@jforissier jforissier left a comment

Choose a reason for hiding this comment

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

For "ta: crypt: fix authenc entries" and "xtest: return out-buffer sizes unconditionally":
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> for commits
"ta: crypt: fix authenc entries" and
"xtest: return out-buffer sizes unconditionally".

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

For commit "xtest: regression: add case 4017":
1 comment otherwise test 4017 implementation LGTM, pretty well factorized. I'll have another look.

NULL, &dlen);
if (!res)
return ADBG_EXPECT_COMPARE_UNSIGNED(c, dlen, ==, 0) &&
ADBG_EXPECT_COMPARE_UNSIGNED(c, dlen, ==, out);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mean

return ADBG_EXPECT_COMPARE_UNSIGNED(c, dlen, ==, out);

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That works, but with a NULL output buffer it should be 0 also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants