Commit Graph

8921 Commits

Author SHA1 Message Date
Simon Butcher
2e7c7cd756 Merge remote-tracking branch 'public/mbedtls-2.16' into baremetal
* public/mbedtls-2.16: (40 commits)
  Clarify comment mangled by an earlier refactoring
  Add an "out-of-box" component
  Run ssl-opt.sh on 32-bit runtime
  Fix typo in data_file generator code
  Give credit to OSS-Fuzz for #2404
  Remove ssl_cert_test sample app
  Fix the proxy seed in Travis runs
  Update library version to 2.16.1
  Fix errors in AEAD test function
  x509.c: Fix potential memory leak in X.509 self test
  Remove Circle CI script
  Fix ChangeLog entry ordering
  Fix typo
  Add non-regression test for buffer overflow
  Improve documentation of mbedtls_mpi_write_string()
  Adapt ChangeLog
  Fix 1-byte buffer overflow in mbedtls_mpi_write_string()
  Change Perl to Python in test builds
  Fix default port number information
  Silence pylint
  ...
2019-04-24 14:51:33 +01:00
Jarno Lamsa
9454dfaed4 Add a new flag for the micro-ecc 2019-04-24 16:28:59 +03:00
Jarno Lamsa
d50fd6b373 Remove unused headers from uecc sources 2019-04-24 16:19:50 +03:00
Jarno Lamsa
79e3b946db Add CMake support for uecc 2019-04-24 16:17:10 +03:00
Jarno Lamsa
18987a420b Add micro-ecc based ecc-files to mbedtls
The files are from https://github.com/intel/tinycrypt
Using commit 6e0eb53fc8403988f97345e94081b0453f47231d as a base.
2019-04-24 15:40:43 +03:00
Jaeden Amero
b4128bd0c0 Merge remote-tracking branch 'origin/pr/2589' into mbedtls-2.16
* origin/pr/2589:
  Document the scripts behaviour further
  Add --internal option to list-identifiers.sh
2019-04-24 11:23:33 +01:00
Jaeden Amero
9cfc9ceaf9 Merge remote-tracking branch 'origin/pr/2542' into mbedtls-2.16
* origin/pr/2542:
  Add guards for MBEDTLS_X509_CRL_PARSE_C in sample
2019-04-24 11:21:35 +01:00
Jaeden Amero
f57a9349ad Merge remote-tracking branch 'origin/pr/2545' into mbedtls-2.16
* origin/pr/2545: (24 commits)
  Use check_output instead of Popen
  Start unused variable with underscore
  Correct documentation
  Check that the report directory is a directory
  Use namespaces instead of full classes
  Fix pylint issues
  Don't put abi dumps in subfolders
  Add verbose switch to silence all output except the final report
  Fetch the remote crypto branch, rather than cloning it
  Prefix internal functions with underscore
  Add RepoVersion class to make handling of many arguments easier
  Reduce indentation levels
  Improve documentation
  Use optional arguments for setting repositories
  Only build the library
  Add ability to compare submodules from different repositories
  Add handling for cases when not all .so files are present
  Extend functionality to allow setting crypto submodule version
  Simplify logic for checking if report folder can be removed
  Add option for a brief report of problems only
  ...
2019-04-24 11:19:38 +01:00
Jaeden Amero
4400cd1294 Merge remote-tracking branch 'origin/pr/2594' into mbedtls-2.16
* origin/pr/2594:
  Add more missing parentheses around macro parameters
  Add further missing brackets around macro parameters
  Adapt ChangeLog
  Improve macro hygiene
2019-04-24 11:18:25 +01:00
Hanno Becker
9306f1c65d Add more missing parentheses around macro parameters 2019-04-24 10:52:53 +02:00
Hanno Becker
3ac21aca9b Add further missing brackets around macro parameters 2019-04-24 10:52:45 +02:00
Hanno Becker
ee60034a60 Adapt ChangeLog 2019-04-24 10:52:37 +02:00
Hanno Becker
d6028a1894 Improve macro hygiene
This commit improves hygiene and formatting of macro definitions
throughout the library. Specifically:
- It adds brackets around parameters to avoid unintended
  interpretation of arguments, e.g. due to operator precedence.
- It adds uses of the `do { ... } while( 0 )` idiom for macros that
  can be used as commands.
2019-04-24 10:51:54 +02:00
Hanno Becker
ba8cd67467 Guard CID implementations by MBEDTLS_SSL_CID 2019-04-23 12:31:42 +01:00
Hanno Becker
b60c85c67c Indicate ssl-opt.sh CID tests only test the stub CID code 2019-04-23 12:02:34 +01:00
Hanno Becker
8d0893d0b0 Add warnings about status of implementation of CID API 2019-04-23 12:01:20 +01:00
Hanno Becker
963cb35a24 Fix use of requires_config_enabled in ssl-opt.sh
requires_config_enabled doesn't support multiple config options.
Tests having multiple configuration dependencies must be prefixed
with multiple invocations of requires_config_enabled instead.
2019-04-23 11:52:44 +01:00
Hanno Becker
4f98b6ad17 Fix typo in CID test in ssl-opt.sh 2019-04-23 11:52:14 +01:00
Hanno Becker
6dde3dd8ec Print peer CID from ssl_client2 2019-04-23 11:51:47 +01:00
Hanno Becker
8be8a95dea Print peer CID from ssl_server2 2019-04-23 11:51:40 +01:00
Hanno Becker
14751aa966 Improve wording of CID debug msg in ssl_server2 example application 2019-04-23 11:39:53 +01:00
Hanno Becker
b9b7e29536 Clarify that mbedtls_ssl_set_cid() applies to all subsequent HSs 2019-04-23 11:38:47 +01:00
Hanno Becker
d928c06d01 Document that the use of CID is disabled by default.
(Even if MBEDTLS_SSL_CID is set in config.h)
2019-04-23 11:37:38 +01:00
Hanno Becker
efde5b2e96 Reference CID Draft in Connection ID documentation in config.h 2019-04-23 11:36:56 +01:00
Darryl Green
3997a6cd25 Document the scripts behaviour further 2019-04-18 13:18:22 +01:00
Darryl Green
3ef06d5bf7 Add --internal option to list-identifiers.sh
When doing ABI/API checking, its useful to have a list of all the
identifiers that are defined in the internal header files, as we
do not promise compatibility for them. This option allows for a
simple method of getting them for use with the ABI checking script.
2019-04-18 12:02:49 +01:00
Darryl Green
a0415bc779 Use check_output instead of Popen 2019-04-18 11:47:28 +01:00
Darryl Green
03c5e856e8 Start unused variable with underscore 2019-04-18 11:47:28 +01:00
Darryl Green
3c9e7d23b1 Correct documentation 2019-04-18 11:47:28 +01:00
Darryl Green
6b3cbfa370 Check that the report directory is a directory 2019-04-18 11:47:28 +01:00
Darryl Green
30dc6d5bb9 Use namespaces instead of full classes 2019-04-18 11:47:28 +01:00
Darryl Green
26dff8e68d Fix pylint issues 2019-04-18 11:47:28 +01:00
Darryl Green
5783847c63 Don't put abi dumps in subfolders 2019-04-18 11:47:28 +01:00
Darryl Green
6602538544 Add verbose switch to silence all output except the final report 2019-04-18 11:47:28 +01:00
Darryl Green
3f742987b8 Fetch the remote crypto branch, rather than cloning it 2019-04-18 11:47:28 +01:00
Darryl Green
88bfbc2deb Prefix internal functions with underscore 2019-04-18 11:47:28 +01:00
Darryl Green
7381bea6be Add RepoVersion class to make handling of many arguments easier
There are a number of arguments being passed around, nearly all of
which are duplicated between the old and new versions. Moving these
into a separate class should hopefully make it simpler to follow
what is being done.
2019-04-18 11:47:28 +01:00
Darryl Green
0478a32162 Reduce indentation levels 2019-04-18 11:47:28 +01:00
Darryl Green
7c0e052276 Improve documentation 2019-04-18 11:47:28 +01:00
Darryl Green
06c51d0470 Use optional arguments for setting repositories 2019-04-18 11:47:28 +01:00
Darryl Green
c8e6ad4ace Only build the library
We only need the .so files, so only build the library
2019-04-18 11:47:28 +01:00
Darryl Green
879f2509dc Add ability to compare submodules from different repositories
As before with wanting to compare revisions across different
repositories, the ability to select the crypto submodule from a
different repository is useful.
2019-04-18 11:47:28 +01:00
Darryl Green
de118091f2 Add handling for cases when not all .so files are present
We may wish to compare ABI/API between Mbed TLS and Mbed Crypto,
which will cause issues as not all .so files are shared. Only
compare .so files which both libraries have.
2019-04-18 11:47:28 +01:00
Darryl Green
ae5d66c612 Extend functionality to allow setting crypto submodule version
As going forward we will have Crypto in a submodule, we will need to
be able to check ABI compatibility between versions using different
submodule versions. For TLS versions that support the submodule, we
will always build using the submodule.

If the Crypto submodule is used, libmbedcrypto.so is not in the main
library folder, but in crypto/library instead. Given this, the script
searches for *.so files and notes their path, in order to create the
dumps correctly.
2019-04-18 11:47:28 +01:00
Darryl Green
131e24b1b5 Simplify logic for checking if report folder can be removed 2019-04-18 11:47:28 +01:00
Darryl Green
0da4578fae Add option for a brief report of problems only 2019-04-18 11:47:28 +01:00
Darryl Green
668063bca2 Add option to skip identifiers in ABI checks
By default abi-compliance-checker will check the entire ABI/API.
There are internal identifiers that we do not promise compatibility
for, so we want the ability to skip them when checking the ABI/API.
2019-04-18 11:47:28 +01:00
Darryl Green
5a301f0868 Extend abi-checking to different repos 2019-04-18 11:47:28 +01:00
Jaeden Amero
4cd4b4bf83 abi_check: Update submodules
When grabbing a fresh copy of a branch, it's required to also fetch the
submodule. Add fetching the submodule to abi_check.py.
2019-04-18 11:44:32 +01:00
Jaeden Amero
9ef6028da0 abi_check: Allow checking current checkout
Without a "--detach" option, git worktree will refuse to checkout a branch
that's already checked out. This makes the abi_check.py script not very
useful for checking the currently checked out branch, as git will error
that the branch is already checked out. Add the "--detach" option to check
out the new temporary worktree in detached head mode. This is acceptable
because we aren't planning on working on the branch and just want a
checkout to do ABI checking from.
2019-04-18 11:44:32 +01:00