Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/architecture/psa-crypto-implementation-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Summary of files to modify when adding a new algorithm or key type:
* [ ] `tests/suites/test_suite_psa_crypto_metadata.data` — [New functions and macros](#new-functions-and-macros)
* (If adding `PSA_IS_xxx`) `tests/suites/test_suite_psa_crypto_metadata.function` — [New functions and macros](#new-functions-and-macros)
* [ ] `tests/suites/test_suite_psa_crypto*.data`, `tests/suites/test_suite_psa_crypto*.function` — [Unit tests](#unit-tests)
* [ ] `scripts/mbedtls_dev/crypto_knowledge.py`, `scripts/mbedtls_dev/asymmetric_key_data.py` — [Unit tests](#unit-tests)
* [ ] `framework/scripts/mbedtls_framework/crypto_knowledge.py`, `framework/scripts/mbedtls_framework/asymmetric_key_data.py` — [Unit tests](#unit-tests)
* [ ] `ChangeLog.d/*.txt` — changelog entry

Summary of files to modify when adding new API functions:
Expand Down Expand Up @@ -161,8 +161,8 @@ A number of unit tests are automatically generated by `tests/scripts/generate_ps

When adding a new key type or algorithm:

* `scripts/mbedtls_dev/crypto_knowledge.py` contains knowledge about the compatibility of key types, key sizes and algorithms.
* `scripts/mbedtls_dev/asymmetric_key_data.py` contains valid key data for asymmetric key types.
* `framework/scripts/mbedtls_framework/crypto_knowledge.py` contains knowledge about the compatibility of key types, key sizes and algorithms.
* `framework/scripts/mbedtls_framework/asymmetric_key_data.py` contains valid key data for asymmetric key types.

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):

Expand Down
2 changes: 1 addition & 1 deletion framework
Submodule framework updated 42 files
+26 −0 CONTRIBUTING.md
+7 −2 README.md
+37 −0 dco.txt
+138 −0 docs/framework-design.md
+12 −0 psasim/.gitignore
+64 −0 psasim/Makefile
+60 −0 psasim/README.md
+78 −0 psasim/include/psa/client.h
+36 −0 psasim/include/psa/error.h
+17 −0 psasim/include/psa/lifecycle.h
+249 −0 psasim/include/psa/service.h
+15 −0 psasim/include/psasim/init.h
+380 −0 psasim/src/client.c
+23 −0 psasim/src/common.c
+85 −0 psasim/src/common.h
+655 −0 psasim/src/service.c
+12 −0 psasim/test/Makefile
+48 −0 psasim/test/client.c
+29 −0 psasim/test/manifest.json
+105 −0 psasim/test/server.c
+163 −0 psasim/tools/psa_autogen.py
+3 −0 scripts/mbedtls_framework/__init__.py
+237 −0 scripts/mbedtls_framework/asymmetric_key_data.py
+406 −0 scripts/mbedtls_framework/bignum_common.py
+896 −0 scripts/mbedtls_framework/bignum_core.py
+159 −0 scripts/mbedtls_framework/bignum_data.py
+102 −0 scripts/mbedtls_framework/bignum_mod.py
+242 −0 scripts/mbedtls_framework/bignum_mod_raw.py
+120 −0 scripts/mbedtls_framework/build_tree.py
+162 −0 scripts/mbedtls_framework/c_build_helper.py
+131 −0 scripts/mbedtls_framework/c_parsing_helper.py
+473 −0 scripts/mbedtls_framework/c_wrapper_generator.py
+112 −0 scripts/mbedtls_framework/crypto_data_tests.py
+568 −0 scripts/mbedtls_framework/crypto_knowledge.py
+875 −0 scripts/mbedtls_framework/ecp.py
+46 −0 scripts/mbedtls_framework/logging_util.py
+539 −0 scripts/mbedtls_framework/macro_collector.py
+161 −0 scripts/mbedtls_framework/psa_information.py
+206 −0 scripts/mbedtls_framework/psa_storage.py
+91 −0 scripts/mbedtls_framework/test_case.py
+224 −0 scripts/mbedtls_framework/test_data_generation.py
+28 −0 scripts/mbedtls_framework/typing_util.py
3 changes: 2 additions & 1 deletion scripts/abi_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@

import xml.etree.ElementTree as ET

from mbedtls_dev import build_tree
import framework_scripts_path # pylint: disable=unused-import
from mbedtls_framework import build_tree


class AbiChecker:
Expand Down
7 changes: 4 additions & 3 deletions scripts/code_size_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
import typing
from enum import Enum

from mbedtls_dev import build_tree
from mbedtls_dev import logging_util
from mbedtls_dev import typing_util
import framework_scripts_path # pylint: disable=unused-import
from mbedtls_framework import build_tree
from mbedtls_framework import logging_util
from mbedtls_framework import typing_util

class SupportedArch(Enum):
"""Supported architecture for code size measurement."""
Expand Down
17 changes: 17 additions & 0 deletions scripts/framework_scripts_path.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""Add our Python library directory to the module search path.

Usage:

import framework_scripts_path # pylint: disable=unused-import
"""

# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
#

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__),
os.path.pardir,
'framework', 'scripts'))
4 changes: 3 additions & 1 deletion scripts/generate_driver_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import argparse
import jsonschema
import jinja2
from mbedtls_dev import build_tree

import framework_scripts_path # pylint: disable=unused-import
from mbedtls_framework import build_tree

JSONSchema = NewType('JSONSchema', object)
# The Driver is an Object, but practically it's indexable and can called a dictionary to
Expand Down
5 changes: 3 additions & 2 deletions scripts/generate_psa_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
import os
import sys

from mbedtls_dev import build_tree
from mbedtls_dev import macro_collector
import framework_scripts_path # pylint: disable=unused-import
from mbedtls_framework import build_tree
from mbedtls_framework import macro_collector

OUTPUT_TEMPLATE = '''\
/* Automatically generated by generate_psa_constant.py. DO NOT EDIT. */
Expand Down
4 changes: 3 additions & 1 deletion scripts/generate_ssl_debug_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
import os
import textwrap
import argparse
from mbedtls_dev import build_tree

import framework_scripts_path # pylint: disable=unused-import
from mbedtls_framework import build_tree


def remove_c_comments(string):
Expand Down
3 changes: 0 additions & 3 deletions scripts/mbedtls_dev/__init__.py

This file was deleted.

237 changes: 0 additions & 237 deletions scripts/mbedtls_dev/asymmetric_key_data.py

This file was deleted.

Loading