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

[RFC] MbedTLS integration (MbedTLS as a git submodule) #4

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

Commits on Mar 1, 2024

  1. mbedtls: add mbedtls as a submodule

    Add mbedtls as a submodule.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    0b7514c View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. mbedtls: switch mbedtls to v3.6.0

    Take mbedtls LTS release from tag v3.6.0
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    0691089 View commit details
    Browse the repository at this point in the history
  2. makefile: add git submodule init and update

    Retrieve all git submodules before building
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    bfb965d View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. mbedtls: add mbedtls into the build system

    Port mbedtls with dummy libc header files.
    Add mbedtls default config header file.
    Add mbedtls kbuild makefile.
    Add Kconfig and mbedtls config submenu.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    c860f61 View commit details
    Browse the repository at this point in the history
  2. makefile: apply MbedTLS patches

    Apply MbedTLS patch if any exist before building.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    ee056b7 View commit details
    Browse the repository at this point in the history
  3. arm: EFI linker script text section alignment

    Add text section alignment to fix sbsign signing warning
    'gaps in the section table may result in different checksums'
    which causes a failure of efi_image_verify_diges()
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    fd7e575 View commit details
    Browse the repository at this point in the history
  4. test: py: add sudo for virt-make-fs

    Fix a permission issue when running virt-make-fs
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    8964813 View commit details
    Browse the repository at this point in the history
  5. image: remove redundant hash includes

    Remove the redundant includes of u-boot/md5.h, u-boot/sha1.h,
    u-boot/sha256.h and u-boot/sha512.h
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    e33c1ca View commit details
    Browse the repository at this point in the history
  6. efi_loader: remove redundant hash includes

    Remove the redundant includes of u-boot/sha1.h, u-boot/sha256.h
    and u-boot/sha512.h
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    4e3da37 View commit details
    Browse the repository at this point in the history
  7. mbedtls: add hash shim layer

    Create a hash shim layer on top of mbedtls crypto library.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    a4b7669 View commit details
    Browse the repository at this point in the history
  8. hash: integrate hash on mbedtls

    Integrate common/hash.c on the hash shim layer so that hash APIs
    from mbedtls can be leveraged by boot/image and efi_loader.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    dc76327 View commit details
    Browse the repository at this point in the history
  9. makefile: add mbedtls include directories

    Add the mbedtls include directories into the build system.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    69839e3 View commit details
    Browse the repository at this point in the history
  10. efi_loader: switch sha256 to mbedtls

    When MBEDTLS_LIB_CRYPTO is enabled, use the APIs of sha256 from
    hash shim layer instead.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    4a1a070 View commit details
    Browse the repository at this point in the history
  11. image: switch sha256 to mbedtls

    When MBEDTLS_LIB_CRYPTO is enabled, use the APIs of sha256 from
    hash shim layer instead.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    ef01167 View commit details
    Browse the repository at this point in the history
  12. mbedtls: add PKCS7 parser patches for MBedTLS

    Added patches for MBedTLS PKCS7 parser to support MicroSoft
    Authenticate Code with Authenticate Attributes.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    67dba44 View commit details
    Browse the repository at this point in the history
  13. mbedtls: add MbedTLS patch to support multiple certs

    Add mbedtls patch to support multiple signer's certs in the signed
    data within a PKCS7 message.
    Update the related MbedTLS test suites.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    acc848f View commit details
    Browse the repository at this point in the history
  14. lib/crypto: Port public_key on MbedTLS

    Integrate function public_key_verify_signature on top of MbedTLS
    pk library.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    fbf5173 View commit details
    Browse the repository at this point in the history
  15. lib/crypto: Port x509_cert_parser on MbedTLS

    Integrate x509_cert_parser on top of MbedTLS x509 library.
    Add API x509_populate_cert and x509_populate_pubkey for code
    reusability between x509 and pkcs7 parsers.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    d741390 View commit details
    Browse the repository at this point in the history
  16. lib/crypto: port PKCS7 parser on MbedTLS

    Integrate PKCS7 parser on top of MbedTLS PKCS7 library.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    663b601 View commit details
    Browse the repository at this point in the history
  17. lib/crypto: port MSCode parser on MbedTLS

    Integrate MicroSoft Authenticate Code parser on top of MbedTLS
    ASN.1 decoder.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    a7ba247 View commit details
    Browse the repository at this point in the history
  18. lib/crypto: remove dependence on ASN1 decoder

    When building with MbedTLS,  we are using MbedTLS to decode ASN1 data
    for x509, pkcs7 and mscode. So we can remove the dependence on ASN1
    decoder when MBEDTLS_LIB_X509 is enabled.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    e769617 View commit details
    Browse the repository at this point in the history
  19. mbedtls: disable the unused features

    Disable the unused features of MbedTLS to reduce the target size.
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    cc87af2 View commit details
    Browse the repository at this point in the history
  20. configs: enable MbedTLS as default setting

    Enable MbedTLS as default setting for qemu arm64
    
    Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
    raymo200915 committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    f2deb7e View commit details
    Browse the repository at this point in the history