Skip to content

Streamline PSA key type encodings: prepare #333

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

gilles-peskine-arm
Copy link
Collaborator

@gilles-peskine-arm gilles-peskine-arm commented Dec 11, 2019

This PR is a collection of small internal refactorings, test improvements and tooling bug fixes with no real common theme other than to prepare for #330. I'm raising it separately because #330 has grown bigger than I'd initially planned.

@gilles-peskine-arm gilles-peskine-arm added enhancement New feature or request needs: ci Needs a passing full CI run labels Dec 11, 2019
Filter out non-ASCII characters in automatically processed headers.

Do this in a way that minimizes the code change: keep manipulating
strings, but strip off non-ASCII characters when reading lines, which
should only remove characters in comments that we don't parse anyway.
This is useful to inspect what the script does manually, in particular
to check that expected values do get tested. --keep-c provides the
same information but in a way that's harder to access.
@gilles-peskine-arm gilles-peskine-arm force-pushed the psa-streamline_encodings-prepare_for_types branch from 4440a7c to 58222cd Compare December 11, 2019 11:18
Fail the test instead of crashing if a memory allocation fails.

Free memory even if the test fails.
Also insist on their category.

Fix a missing implementation of PSA_BLOCK_CIPHER_BLOCK_SIZE for
ChaCha20.
Test a Brainpool curve and a curve whose bit size is not a multiple of 8.
@gilles-peskine-arm gilles-peskine-arm force-pushed the psa-streamline_encodings-prepare_for_types branch from 58222cd to 4cd3277 Compare December 12, 2019 08:00
@gilles-peskine-arm gilles-peskine-arm added needs: review The pull request is ready for review. This generally means that it has no known issues. and removed needs: ci Needs a passing full CI run labels Dec 12, 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.

Left a comment with a minor suggestion. Looks good to me.

Copy link
Contributor

@dgreen-arm dgreen-arm left a comment

Choose a reason for hiding this comment

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

Looks good to me

@gilles-peskine-arm
Copy link
Collaborator Author

CI failures:

  • check_generated_files fails on TLS. Preexisting issue until the crypto submodule is updated in mbedtls.
  • A DTLS failure due to CI load. Preexisting issue, unrelated to this PR.

@Patater Patater merged commit 1602795 into ARMmbed:development Dec 13, 2019
gilles-peskine-arm added a commit to gilles-peskine-arm/mbed-crypto that referenced this pull request Feb 3, 2020
Previously in d875285:
* ARMmbed#333: Streamline PSA key type encodings: prepare
* ARMmbed#323: Initialise return values to an error

Previously in dbcb442:
* ARMmbed#291: Test MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
* ARMmbed#334: Fix some pylint warnings

Previously in ceceedb:
* ARMmbed#348: Bump version to Mbed TLS 2.20.0 and crypto SO version to 4
* ARMmbed#354: Fix incrementing pointer instead of value

In this commit:
* ARMmbed#349: Fix minor defects found by Coverity
* ARMmbed#179: Add option to build SHA-512 without SHA-384
* ARMmbed#327: Implement psa_hash_compute and psa_hash_compare
* ARMmbed#330: Streamline PSA key type and curve encodings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs: review The pull request is ready for review. This generally means that it has no known issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants