Commit Graph

256 Commits

Author SHA1 Message Date
Gilles Peskine
16dfdb3539 Allow running /somewhere/else/path/to/abi_check.py
Don't require abi_check.py to be the one in scripts/ under the current
directory.
2019-07-05 17:06:42 +02:00
Jaeden Amero
a33bb945eb windows: Fix Release x64 configuration
Inherit PlatformToolset from the project configuration. This allow the
project to configure PlatformToolset, and aligns the Release x64 build
with other build types.

Fixes #1430
2019-06-20 16:30:35 +01:00
Jaeden Amero
d03977dc3c Merge remote-tracking branch 'origin/pr/2677' into mbedtls-2.7
* origin/pr/2677:
  Show removed symbols in abi check
2019-06-14 08:54:35 +01:00
Darryl Green
db95d7e99d Show removed symbols in abi check 2019-06-05 12:59:07 +01:00
Darryl Green
3e9626ea32 Remove all abi dumps, not just ones shared between versions
While the abi-checking script handled comparing only the modules
that were shared between the old and new versions correctly, the
cleanup of the abi dumps only removed what was shared. Change the
cleanup logic to remove all abi dumps instead.
2019-05-29 13:40:54 +01:00
Darryl Green
8194871075 Only use submodule if present
Enabling the USE_CRYPTO_SUBMODULE option causes problems if the
crypto submodule isn't present. For example, when building
mbed-crypto as a submodule, it should use error.c from the parent
project if USE_CRYPTO_SUBMODULE is set. However if the parent
project isn't present, then the build will fail. Only enable it
if the submodule actually exists.
2019-05-09 13:25:56 +01:00
Darryl Green
62a18e32d0 Add documentation for why we're catching all exceptions
We wish to distinguish between success, an abi break and a script
failure, so catch all uncaught exceptions and exit explicitly
with status 2
2019-04-18 16:25:56 +01:00
Darryl Green
4a483e4829 Use check_output instead of Popen 2019-04-18 11:51:49 +01:00
Darryl Green
31a1e99874 Start unused variable with underscore 2019-04-18 11:51:49 +01:00
Darryl Green
bbc6ccfa2f Correct documentation 2019-04-18 11:51:49 +01:00
Darryl Green
03625fe311 Check that the report directory is a directory 2019-04-18 11:51:49 +01:00
Darryl Green
f1d272d0ca Use namespaces instead of full classes 2019-04-18 11:51:49 +01:00
Darryl Green
b7447e7d2a Fix pylint issues 2019-04-18 11:51:49 +01:00
Darryl Green
cf43425941 Don't put abi dumps in subfolders 2019-04-18 11:51:49 +01:00
Darryl Green
f0f9f7fe7d Add verbose switch to silence all output except the final report 2019-04-18 11:51:49 +01:00
Darryl Green
b743309c00 Fetch the remote crypto branch, rather than cloning it 2019-04-18 11:51:49 +01:00
Darryl Green
7bb9cb5ce3 Prefix internal functions with underscore 2019-04-18 11:51:49 +01:00
Darryl Green
02b6865dc7 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:51:49 +01:00
Darryl Green
7be79c9e77 Reduce indentation levels 2019-04-18 11:51:49 +01:00
Darryl Green
765d20d3d8 Improve documentation 2019-04-18 11:51:49 +01:00
Darryl Green
826e5af85d Use optional arguments for setting repositories 2019-04-18 11:51:49 +01:00
Darryl Green
997c287ce9 Only build the library
We only need the .so files, so only build the library
2019-04-18 11:51:49 +01:00
Darryl Green
87aedf6202 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:51:49 +01:00
Darryl Green
d98d8b50dc 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:51:49 +01:00
Darryl Green
d9ad9ec81c 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:51:49 +01:00
Darryl Green
ab3893b815 Simplify logic for checking if report folder can be removed 2019-04-18 11:51:49 +01:00
Darryl Green
32e7a50c82 Add option for a brief report of problems only 2019-04-18 11:51:49 +01:00
Darryl Green
d3cde6f2d3 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:51:49 +01:00
Darryl Green
834ebc415c Extend abi-checking to different repos 2019-04-18 11:51:49 +01:00
Gilles Peskine
fceb4ce767 abi_check.py: Document more methods 2019-04-18 11:51:38 +01:00
Jaeden Amero
346f9595c9 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:40:21 +01:00
Jaeden Amero
5857c2f43f 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:40:21 +01:00
Darryl Green
31321ca893 Fix minor issues with command line options 2019-04-18 11:40:21 +01:00
Darryl Green
4cd7a9b8ed Updated abi_check.py docstrings 2019-04-18 11:40:21 +01:00
Darryl Green
c47ac2651a Fix current directory check 2019-04-18 11:40:21 +01:00
Darryl Green
e3e6b18351 Add copyright to abi_check script 2019-04-18 11:40:21 +01:00
Darryl Green
3da1504229 Add script for ABI compatibility checking 2019-04-18 11:40:21 +01:00
Andres Amaya Garcia
21ade06ef8 Reduce priority of 3DES ciphersuites 2019-02-13 09:52:46 +00:00
Simon Butcher
f15cfd5d04 Merge remote-tracking branch 'public/pr/1557' into mbedtls-2.7 2018-06-27 11:07:50 +01:00
Simon Butcher
e83b1ae201 Merge remote-tracking branch 'public/pr/1606' into mbedtls-2.7 2018-06-01 19:34:44 +01:00
Jaeden Amero
11d5551d0a Merge remote-tracking branch 'upstream-public/pr/1487' into mbedtls-2.7-proposed 2018-05-04 11:06:21 +01:00
Andres AG
430e68c4b7 Remove refs to VS6 from generate_visualc_files.pl 2018-05-01 21:01:20 +01:00
Andres Amaya Garcia
464b1491c2 genereate_visualc_files.pl deletes old files
Add a function that deletes all the old Visual Studio prokect files
before generating the new ones. This ensure that project files for
delete example applications are removed from the repository.
2018-05-01 21:01:16 +01:00
fbrosson
3a7457136e Backport 2.7: Use "#!/usr/bin/env perl" as shebang line. 2018-04-04 22:26:56 +00:00
Jaeden Amero
844dcb38c8 Merge remote-tracking branch 'upstream-public/pr/1134' into mbedtls-2.7-proposed
Fixes #504 and fixes #1057 for the 2.7 branch
2018-03-29 10:54:25 +01:00
Gilles Peskine
53038ebecc all.sh: with --no-armcc, don't call armcc from output_env.sh
When not running armcc, don't try to invoke armcc at all, not even to
report its version.
2018-03-21 08:48:26 +01:00
Hanno Becker
e856e84de3 Don't enable RSA_NO_CRT in config.pl full 2018-03-09 10:47:01 +00:00
Jaeden Amero
3a11404fcb Add LinkLibraryDependencies to VS2010 app template
Add mbedTLS.vcxproj to the VS2010 application template so that the next
time we auto-generate the application project files, the
LinkLibraryDependencies for mbedTLS.vcxproj are maintained.

Fixes #1347
2018-02-22 12:22:21 +00:00
Gilles Peskine
7ecab3df4c Error codes for hardware accelerator failures
Add MBEDTLS_ERR_XXX_HW_ACCEL_FAILED error codes for all cryptography
modules where the software implementation can be replaced by a hardware
implementation.

This does not include the individual message digest modules since they
currently have no way to return error codes.

This does include the higher-level md, cipher and pk modules since
alternative implementations and even algorithms can be plugged in at
runtime.
2018-01-26 17:56:38 +01:00
Gilles Peskine
9214327623 Sort list to make things easier to find 2018-01-25 23:26:24 +01:00