Skip to content

Update Mbed OS with Mbed Crypto merged into Mbed TLS #12757

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 7 commits into from
Apr 30, 2020

Conversation

dgreen-arm
Copy link
Contributor

@dgreen-arm dgreen-arm commented Apr 3, 2020

Summary of changes

Update Mbed TLS to a version that brings in Mbed Crypto remerged into Mbed TLS.
Remove Mbed Crypto.

Impact of changes

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@mergify mergify bot added the do not merge label Apr 3, 2020
@ciarmcom ciarmcom requested review from a team April 3, 2020 15:00
@ciarmcom
Copy link
Member

ciarmcom commented Apr 3, 2020

@dgreen-arm, thank you for your changes.
@ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-tls @ARMmbed/mbed-os-crypto @ARMmbed/mbed-os-test please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 6, 2020

I set this to try first run CI, but due to the CI load, t his might get in about 2-3 days.

@mbed-ci
Copy link

mbed-ci commented Apr 7, 2020

Test run: FAILED

Summary: 3 of 3 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests-lts
  • jenkins-ci/mbed-os-ci_build-GCC_ARM-lts
  • jenkins-ci/mbed-os-ci_build-ARM-lts

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 7, 2020

CI lts not related to this PR, will be cleared and proper CI restarted after 5.15 PRs are all integrated

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 16, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Apr 16, 2020

Test run: FAILED

Summary: 3 of 3 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests
  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@@ -0,0 +1,175 @@
/*
* PSA crypto core internal interfaces
Copy link
Contributor

Choose a reason for hiding this comment

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

Any idea why this isn't being picked up as a move/rename by git? Was it actually not present in Mbed OS before? Or did we forget to remove the old copy? (in commit "Update Mbed TLS to latest version")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I might have made a mistake when updating the Makefile. There look to be two copies of this file (and the others you've pointed this out on) now, one in src and one in platform/COMPONENT_PSA_SRV_IMPL. Is there something I missed with the Makefile changes?

Copy link
Contributor

Choose a reason for hiding this comment

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

If the Makefile places this in a new location, you'll have to manually delete it using git. The Makefile won't run git to add or remove files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I've worked it out, I had combined the Makefiles badly so I was duplicating all the PSA specific headers. There shouldn't be duplicated files now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

crypto_compat.h still seems to be deleting and remaking, rather than doing a move, not sure why. Maybe the file changed too much?

@@ -0,0 +1,79 @@
/**
* \file psa_crypto_invasive.h
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we see this as a move/rename?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -0,0 +1,144 @@
/** \file psa_crypto_its.h
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we see this as a move/rename?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -0,0 +1,190 @@
/*
* PSA crypto support for secure element drivers
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we see this as a move/rename?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

* This file is part of mbed TLS (https://tls.mbed.org)
*/

#ifndef PSA_CRYPTO_SERVICE_INTEGRATION_H
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we see this as a move/rename?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -0,0 +1,129 @@
/*
* PSA crypto layer on top of Mbed TLS crypto
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we see this as a move/rename?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -0,0 +1,390 @@
/**
* \file psa_crypto_storage.h
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we see this as a move/rename?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@mergify mergify bot added needs: work and removed needs: CI labels Apr 17, 2020
@mergify mergify bot dismissed Patater’s stale review April 21, 2020 13:26

Pull request has been modified.

Patater
Patater previously approved these changes Apr 21, 2020
Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot added needs: CI and removed needs: work labels Apr 21, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 21, 2020

is this still WIP? I'll review shortly

@Patater
Copy link
Contributor

Patater commented Apr 21, 2020

It looks no longer WIP to me. @dgreen-arm Could you comment what testing you've done with this? Thanks.

@dgreen-arm
Copy link
Contributor Author

@dgreen-arm dgreen-arm changed the title WIP: Update Mbed OS with Mbed Crypto merged into Mbed TLS Update Mbed OS with Mbed Crypto merged into Mbed TLS Apr 21, 2020
@mergify
Copy link

mergify bot commented Apr 30, 2020

This PR cannot be merged due to conflicts. Please rebase to resolve them.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 30, 2020

@dgreen-arm the latest PSA removal PR created conflicts here. Can you please rebase, we will restart tests

Mbed Crypto has been remerged back into Mbed TLS. Update the
Mbed TLS importer script with the relevant parts of the
Mbed Crypto importer.

Signed-off-by: Darryl Green <darryl.green@arm.com>
As Mbed Crypto has been remerged into Mbed TLS, remove Mbed Crypto
at the same time.

Signed-off-by: Darryl Green <darryl.green@arm.com>
Signed-off-by: Darryl Green <darryl.green@arm.com>
Signed-off-by: Darryl Green <darryl.green@arm.com>
Signed-off-by: Darryl Green <darryl.green@arm.com>
Signed-off-by: Darryl Green <darryl.green@arm.com>
Signed-off-by: Darryl Green <darryl.green@arm.com>
@mergify mergify bot dismissed 0xc0170’s stale review April 30, 2020 10:29

Pull request has been modified.

@dgreen-arm
Copy link
Contributor Author

I've rebased the PR, conflicts should be resolved now.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 30, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 30, 2020

Test run: FAILED

Summary: 1 of 6 test jobs failed
Build number : 7
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170 0xc0170 merged commit af4c8a9 into ARMmbed:master Apr 30, 2020
@mergify mergify bot removed the ready for merge label Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants