Commit Graph

7036 Commits

Author SHA1 Message Date
Hanno Becker
cba45bd272 Document support for MD2 and MD4 in programs/x509/cert_write 2019-06-03 16:22:19 +01:00
Hanno Becker
b6bf4967de Correct name of X.509 parsing test for well-formed, ill-signed CRT 2019-06-03 16:22:13 +01:00
Hanno Becker
958c41196a Add test cases exercising successful verification of MD2/MD4/MD5 CRT 2019-06-03 16:22:10 +01:00
Hanno Becker
c6b33dbdda Add test case exercising verification of valid MD2 CRT
The X.509 parsing test suite test_suite_x509parse contains a test
exercising X.509 verification for a valid MD4/MD5 certificate in a
profile which doesn't allow MD4/MD5. This commit adds an analogous
test for MD2.
2019-06-03 16:22:08 +01:00
Hanno Becker
dcb1e60521 Add MD[245] test CRTs to tree 2019-06-03 16:22:01 +01:00
Hanno Becker
067f3574b9 Add instructions for MD[245] test CRTs to tests/data_files/Makefile 2019-06-03 16:21:57 +01:00
Hanno Becker
8956362466 Add suppport for MD2 to CSR and CRT writing example programs
The example programs programs/x509/cert_req and programs/x509/cert_write
(demonstrating the use of X.509 CSR and CRT writing functionality)
previously didn't support MD2 signatures.

For testing purposes, this commit adds support for MD2 to cert_req,
and support for MD2 and MD4 to cert_write.
2019-06-03 16:21:53 +01:00
Hanno Becker
fb63a7c532 Convert further x509parse tests to use lower-case hex data 2019-06-03 16:21:32 +01:00
Jaeden Amero
9883e899ef Merge remote-tracking branch 'origin/pr/2665' into mbedtls-2.7
* origin/pr/2665:
  test: Always use `make clean` by itself
2019-06-03 09:56:26 +01:00
Jaeden Amero
c03c6ac955 test: Always use make clean by itself
When running make with parallelization, running both "clean" and "lib"
with a single make invocation can lead to each target building in
parallel. It's bad if lib is partially done building something, and then
clean deletes what was built. This can lead to errors later on in the
lib target.

    $ make -j9 clean lib
      CC    aes.c
      CC    aesni.c
      CC    arc4.c
      CC    aria.c
      CC    asn1parse.c
      CC    ./library/error.c
      CC    ./library/version.c
      CC    ./library/version_features.c
      AR    libmbedcrypto.a
    ar: aes.o: No such file or directory
    Makefile:120: recipe for target 'libmbedcrypto.a' failed
    make[2]: *** [libmbedcrypto.a] Error 1
    Makefile:152: recipe for target 'libmbedcrypto.a' failed
    make[1]: *** [libmbedcrypto.a] Error 2
    Makefile:19: recipe for target 'lib' failed
    make: *** [lib] Error 2
    make: *** Waiting for unfinished jobs....

To avoid this sort of trouble, always invoke clean by itself without
other targets throughout the library. Don't run clean in parallel with
other rules. The only place where clean was run in parallel with other
targets was in list-symbols.sh.
2019-05-31 17:48:48 +01:00
Hanno Becker
253fbfa7ec Correct placement of ChangeLog entry 2019-05-30 11:11:42 +01:00
Hanno Becker
de2a06db9e Adapt ChangeLog 2019-05-30 11:11:24 +01:00
Hanno Becker
29cf243781 Use SHA-256 instead of MD2 in X.509 CRT parsing tests
- Replace 'RSA with MD2' OID '2a864886f70d010102' by
  'RSA with SHA-256' OID '2a864886f70d01010b':
  Only the last byte determines the hash, and
  `MBEDTLS_OID_PKCS1_MD2 == MBEDTLS_OID_PKCS1 "\x02"`
  `MBEDTLS_OID_PKCS1_SHA256 == MBEDTLS_OID_PKCS1 "\x0b"`
  See oid.h.
- Replace MD2 dependency by SHA256 dependency.
- Adapt expected CRT info output.
2019-05-30 11:11:24 +01:00
Hanno Becker
f9681e53f2 Consistently use lower case hex data in X.509 parsing tests 2019-05-30 11:11:24 +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
Renz Christian Bagaporo
dd84440366 Create link to include/mbedtls only when testing is enabled 2019-05-27 16:33:38 +08:00
Jaeden Amero
d605387cec Merge remote-tracking branch 'origin/pr/2649' into mbedtls-2.7
* origin/pr/2649:
  list-symbols.sh: if the build fails, print the build transcript
  Document "check-names.sh -v"
  all.sh: invoke check-names.sh in print-trace-on-exit mode
  Print a command trace if the check-names.sh exits unexpectedly
2019-05-23 15:14:19 +01:00
Jaeden Amero
b8ae1451e2 Merge remote-tracking branch 'origin/pr/2612' into mbedtls-2.7
* origin/pr/2612:
  Adjust backport's documentation to account for missing features
  Backport a doxygen note from development for `mbedtls_ssl_conf_max_frag_len()`
  Update change log
  Reword ssl_conf_max_frag_len documentation for clarity
2019-05-23 15:13:46 +01:00
Gilles Peskine
227ee24c1f list-symbols.sh: if the build fails, print the build transcript
If "make clean lib" fails in list-symbols.sh, print the transcript
from running make.
2019-05-22 19:07:57 +02:00
Gilles Peskine
017adc7c9c Document "check-names.sh -v" 2019-05-22 19:07:57 +02:00
Gilles Peskine
e952fdf2d4 all.sh: invoke check-names.sh in print-trace-on-exit mode 2019-05-15 17:55:22 +02:00
Gilles Peskine
ef39c49cd7 Print a command trace if the check-names.sh exits unexpectedly
We've observed that sometimes check-names.sh exits unexpectedly with
status 2 and no error message. The failure is not reproducible. This
commits makes the script print a trace if it exits unexpectedly.
2019-05-15 17:41:27 +02:00
Jaeden Amero
e58c881418 Merge remote-tracking branch 'origin/pr/2638' into mbedtls-2.7
* origin/pr/2638:
  Only use submodule if present
2019-05-14 16:20:35 +01:00
Jaeden Amero
63098de866 Merge remote-tracking branch 'origin/pr/2494' into mbedtls-2.7
* origin/pr/2494:
  Ignore more generated files: seedfile, apidoc
  Improve .gitignore grouping and documentation
  Generate tags for Vi, for Emacs and with Global
2019-05-14 16:19:46 +01:00
k-stachowiak
8aed8e1612 Adjust backport's documentation to account for missing features 2019-05-10 15:09:21 +02: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
Jaeden Amero
4072bec51e Merge remote-tracking branch 'origin/pr/2563' into mbedtls-2.7
* origin/pr/2563:
  Fix CMake build error on Cygwin and minGW platforms
2019-05-01 09:57:09 +01:00
k-stachowiak
2dd69e1c05 Backport a doxygen note from development for mbedtls_ssl_conf_max_frag_len() 2019-04-30 12:32:11 +02:00
k-stachowiak
5b001e07a8 Update change log 2019-04-29 12:58:53 +02:00
Manuel Pégourié-Gonnard
59bc9a152f Use 'config.pl baremetal' in all.sh 2019-04-29 12:49:57 +02:00
k-stachowiak
79ad28661e Reword ssl_conf_max_frag_len documentation for clarity 2019-04-29 12:33:43 +02:00
Jaeden Amero
7f13157b56 Merge remote-tracking branch 'origin/pr/2588' into mbedtls-2.7
* origin/pr/2588:
  Document the scripts behaviour further
  Add --internal option to list-identifiers.sh
2019-04-24 11:22:42 +01:00
Jaeden Amero
555a925663 Merge remote-tracking branch 'origin/pr/2541' into mbedtls-2.7
* origin/pr/2541:
  Add guards for MBEDTLS_X509_CRL_PARSE_C in sample
2019-04-24 11:21:02 +01:00
Jaeden Amero
f0aa672e5a Merge remote-tracking branch 'origin/pr/2546' into mbedtls-2.7
* origin/pr/2546: (31 commits)
  Add documentation for why we're catching all exceptions
  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
  ...
2019-04-24 11:19:20 +01:00
Jaeden Amero
2b56a2c945 Merge remote-tracking branch 'origin/pr/2094' into mbedtls-2.7
* origin/pr/2094:
  Adapt ChangeLog
  Add parentheses about parameter of MBEDTLS_X509_ID_FLAG
2019-04-24 11:18:03 +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
Simon Butcher
57f2f69ef4 Clarify ChangeLog entry for fix to #1628 2019-04-18 16:10:42 +01:00
Darryl Green
d0edbd508b Document the scripts behaviour further 2019-04-18 13:18:40 +01:00
Darryl Green
d830fef300 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:01:53 +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