Skip to content

Prepare for removing crypto from mbedtls #173

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

Merged
merged 5 commits into from
Jul 19, 2019

Conversation

Patater
Copy link
Contributor

@Patater Patater commented Jul 15, 2019

As part of work on removing duplicate crypto files from Mbed TLS, some changes are needed in Mbed Crypto. As part of doing this work, a few minor bugs were discovered and fixed as well.

@Patater Patater added bug Something isn't working enhancement New feature or request needs: review The pull request is ready for review. This generally means that it has no known issues. needs: ci Needs a passing full CI run needs: work The pull request needs rework before it can be merged. labels Jul 15, 2019
@Patater Patater force-pushed the prep-remove-crypto-from-tls branch from acbec07 to 7aa90c6 Compare July 15, 2019 13:28
@Patater
Copy link
Contributor Author

Patater commented Jul 15, 2019

Rebased to avoid removal of psa_util.h (which is needed by PK and Cipher, both of which continue to be part of Mbed Crypto for the time being), to get cpp_dummy_build passing, to build without Wunused warnings, and to amend the removal of certs.h commit to pass check-generated-files.

Patater added 5 commits July 15, 2019 15:52
To help the build system find the correct include files, paths starting
with "mbedtls/" or "psa/" must be used. Otherwise, you can run into
build failures like the following when building Mbed Crypto as a
submodule.

    In file included from chachapoly.c:31:0:
    ../../include/mbedtls/chachapoly.h:43:10: fatal error: poly1305.h: No such file or directory
     #include "poly1305.h"
              ^~~~~~~~~~~~
    compilation terminated.

Includes for ALT implementations are not modified, as the alt headers
are provided by system integrators and not Mbed TLS or Mbed Crypto.
In configurations wanting an alternative ripemd160 implementation, We
were including the ordinary Mbed Crypto ripemd160.h instead of the
user-provided ripemd160_alt.h. Use the user-provided header instead.
certs.h is not needed in Mbed Crypto. No programs or other library code
use it.
There is now a test that ensures all headers are included in the
cpp_dummy_build test, so we can't remove compat-1.3.h from the
cpp_dummy_build test until we remove compat-1.3.h.

This reverts commit 2b725ef.
Make some functions non-static, to avoid Wunused function warnings. Make
a function scoped variable block scoped instead, to avoid Wunused
variable warnings in some configurations.
@Patater Patater force-pushed the prep-remove-crypto-from-tls branch from 7aa90c6 to f7dca86 Compare July 15, 2019 14:52
@Patater
Copy link
Contributor Author

Patater commented Jul 15, 2019

Rebased to update base to latest development branch.

@Patater Patater removed needs: work The pull request needs rework before it can be merged. needs: ci Needs a passing full CI run labels Jul 15, 2019
@yanesca
Copy link
Collaborator

yanesca commented Jul 19, 2019

Looks good to me.

@Patater Patater removed the needs: review The pull request is ready for review. This generally means that it has no known issues. label Jul 19, 2019
@Patater Patater merged commit 9565a97 into ARMmbed:development Jul 19, 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 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants