Skip to content

Commit e3abb6a

Browse files
authored
Merge pull request #9094 from davidhorstmann-arm/move-mbedtls-dev-to-framework
Move `mbedtls_dev` to framework submodule
2 parents c7569a8 + a7ec5c8 commit e3abb6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+107
-5859
lines changed

docs/architecture/psa-crypto-implementation-structure.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Summary of files to modify when adding a new algorithm or key type:
8686
* [ ] `tests/suites/test_suite_psa_crypto_metadata.data` — [New functions and macros](#new-functions-and-macros)
8787
* (If adding `PSA_IS_xxx`) `tests/suites/test_suite_psa_crypto_metadata.function` — [New functions and macros](#new-functions-and-macros)
8888
* [ ] `tests/suites/test_suite_psa_crypto*.data`, `tests/suites/test_suite_psa_crypto*.function` — [Unit tests](#unit-tests)
89-
* [ ] `scripts/mbedtls_dev/crypto_knowledge.py`, `scripts/mbedtls_dev/asymmetric_key_data.py` — [Unit tests](#unit-tests)
89+
* [ ] `framework/scripts/mbedtls_framework/crypto_knowledge.py`, `framework/scripts/mbedtls_framework/asymmetric_key_data.py` — [Unit tests](#unit-tests)
9090
* [ ] `ChangeLog.d/*.txt` — changelog entry
9191
9292
Summary of files to modify when adding new API functions:
@@ -161,8 +161,8 @@ A number of unit tests are automatically generated by `tests/scripts/generate_ps
161161
162162
When adding a new key type or algorithm:
163163
164-
* `scripts/mbedtls_dev/crypto_knowledge.py` contains knowledge about the compatibility of key types, key sizes and algorithms.
165-
* `scripts/mbedtls_dev/asymmetric_key_data.py` contains valid key data for asymmetric key types.
164+
* `framework/scripts/mbedtls_framework/crypto_knowledge.py` contains knowledge about the compatibility of key types, key sizes and algorithms.
165+
* `framework/scripts/mbedtls_framework/asymmetric_key_data.py` contains valid key data for asymmetric key types.
166166
167167
Other things need to be tested manually, either in `tests/suites/test_sutie_psa_crypto.data` or in another file. For example (this is not an exhaustive list):
168168

framework

scripts/abi_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@
101101

102102
import xml.etree.ElementTree as ET
103103

104-
from mbedtls_dev import build_tree
104+
import framework_scripts_path # pylint: disable=unused-import
105+
from mbedtls_framework import build_tree
105106

106107

107108
class AbiChecker:

scripts/code_size_compare.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
import typing
2222
from enum import Enum
2323

24-
from mbedtls_dev import build_tree
25-
from mbedtls_dev import logging_util
26-
from mbedtls_dev import typing_util
24+
import framework_scripts_path # pylint: disable=unused-import
25+
from mbedtls_framework import build_tree
26+
from mbedtls_framework import logging_util
27+
from mbedtls_framework import typing_util
2728

2829
class SupportedArch(Enum):
2930
"""Supported architecture for code size measurement."""

scripts/framework_scripts_path.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""Add our Python library directory to the module search path.
2+
3+
Usage:
4+
5+
import framework_scripts_path # pylint: disable=unused-import
6+
"""
7+
8+
# Copyright The Mbed TLS Contributors
9+
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
10+
#
11+
12+
import os
13+
import sys
14+
15+
sys.path.append(os.path.join(os.path.dirname(__file__),
16+
os.path.pardir,
17+
'framework', 'scripts'))

scripts/generate_driver_wrappers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
import argparse
1818
import jsonschema
1919
import jinja2
20-
from mbedtls_dev import build_tree
20+
21+
import framework_scripts_path # pylint: disable=unused-import
22+
from mbedtls_framework import build_tree
2123

2224
JSONSchema = NewType('JSONSchema', object)
2325
# The Driver is an Object, but practically it's indexable and can called a dictionary to

scripts/generate_psa_constants.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
import os
1818
import sys
1919

20-
from mbedtls_dev import build_tree
21-
from mbedtls_dev import macro_collector
20+
import framework_scripts_path # pylint: disable=unused-import
21+
from mbedtls_framework import build_tree
22+
from mbedtls_framework import macro_collector
2223

2324
OUTPUT_TEMPLATE = '''\
2425
/* Automatically generated by generate_psa_constant.py. DO NOT EDIT. */

scripts/generate_ssl_debug_helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
import os
1515
import textwrap
1616
import argparse
17-
from mbedtls_dev import build_tree
17+
18+
import framework_scripts_path # pylint: disable=unused-import
19+
from mbedtls_framework import build_tree
1820

1921

2022
def remove_c_comments(string):

scripts/mbedtls_dev/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/mbedtls_dev/asymmetric_key_data.py

Lines changed: 0 additions & 237 deletions
This file was deleted.

0 commit comments

Comments
 (0)