Skip to content

crypto/mbedtls: Upgrade to v3.6.2 #3401

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

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

Conversation

m-gorecki
Copy link
Contributor

This upgrades mbedtls version to v3.62:

  1. mbedtls repository changed to version v3.6.2
  2. Removed tests that are no longer supported
  3. Updated/modified gcm_mynewt API:
    a) Function mbedtls_gcm_update_add is removed, because now
    function mbedtls_gcm_update_ad from mbedtls upstream
    provides the same functionality.
    b) Due to internal mbedtls API changes mbedtls_gcm_setkey_noalloc
    function now needs one argument more, which is keybits.
    This argument specifies length of key in bits and should
    be set to 128, 192 or 256. Other values won't be accepted.
    In earlier version this could be extracted from
    mbedtls_cipher_info_t key_bitlen field, which is no longer
    the case - now it's 4 bit bitfield later processed by
    internal mbedtls macros.
    It probably would be possible to not break this APIs, but
    since a lot of mbedtls APIs where changed in new version
    it was assumed that migration changes in projects using mbedtls
    would be necessary anyway.

Now -DMBEDTLS_USER_CONFIG_FILE=<mbedtls/config_mynewt.h> flag is
used globally for each build that depends on mbedtls package.
This way we won't have to add this flag in each package
that uses mbedtls.
This adds unit test for additional mynewt GCM related APIs
This upgrades mbedtls version to v3.62:
1. mbedtls repository changed to version v3.6.2
2. Removed tests that are no longer supported
3. Updated/modified gcm_mynewt API:
   a) Function mbedtls_gcm_update_add is removed, because now
      function mbedtls_gcm_update_ad from mbedtls upstream
      provides the same functionality.
   b) Due to internal mbedtls API changes mbedtls_gcm_setkey_noalloc
      function now needs one argument more, which is keybits.
      This argument specifies length of key in bits and should
      be set to 128, 192 or 256. Other values won't be accepted.
      In earlier version this could be extracted from
      mbedtls_cipher_info_t key_bitlen field, which is no longer
      the case - now it's 4 bit bitfield later processed by
      internal mbedtls macros.
   It probably would be possible to not break this APIs, but
   since a lot of mbedtls APIs where changed in new version
   it was assumed that migration changes in projects using mbedtls
   would be necessary anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant