Commit Graph

3612 Commits

Author SHA1 Message Date
Jaeden Amero
9b5c470338 Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted 2018-01-26 15:14:14 +00:00
Jaeden Amero
c6b62d2086 Merge remote-tracking branch 'upstream-public/pr/1311' into mbedtls-1.3 2018-01-26 15:14:10 +00:00
Ron Eldor
08a1936031 Support verbose output of the test suites
generate add ctest test-suites, with the --verbose argument to be given
to the test suites.
The verbose output will be shown **only** if ctest is run with `-v` parameter
The verbose argument is to the test-suites, only when run through `ctest`
2018-01-25 18:30:55 +00:00
Jaeden Amero
492d13dbcf Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted 2018-01-24 15:24:57 +00:00
Jaeden Amero
46624a91fc Merge remote-tracking branch 'upstream-public/pr/1279' into mbedtls-1.3 2018-01-24 10:56:13 +00:00
Gilles Peskine
a9fc8c0b80 Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted 2018-01-23 01:06:53 +01:00
Gilles Peskine
17f6477a1e Merge remote-tracking branch 'upstream-public/pr/1152' into mbedtls-1.3 2018-01-23 01:06:33 +01:00
Gilles Peskine
1446b8cbcb Add ChangeLog entry 2018-01-22 14:40:06 +01:00
Micha Kraus
f78adc5d90 fix bug in get_one_and_zeros_padding()
add test case (“0000000082”) which fails with the old implementation.
2018-01-18 00:01:42 +01:00
Jaeden Amero
d3df16fc0a Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted 2018-01-10 13:15:28 +00:00
Jaeden Amero
d3e3725dda Merge remote-tracking branch 'upstream-public/pr/1268' into mbedtls-1.3 2018-01-10 13:08:27 +00:00
Hanno Becker
78504c7833 Adapt ChangeLog 2018-01-10 11:25:14 +00:00
Hanno Becker
175668a8fd Address issues found by coverity
1) The MPI test for prime generation missed a return value
   check for a call to `mpi_shift_r`. This is neither
   critical nor new but should be fixed.

2) The RSA keygeneration example program contained code
   initializing an RSA context after a potentially failing
   call to CTR DRBG initialization, leaving the corresponding
   RSA context free call in the cleanup section orphaned.
   The commit fixes this by moving the initializtion of the
   RSA context prior to the first potentially failing call.
2018-01-10 11:24:43 +00:00
Manuel Pégourié-Gonnard
ecd9f79edf Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted
* mbedtls-1.3:
  all.sh: add some documentation
  all.sh: new option --no-armcc
  all.sh: --keep-going mode
  all.sh: cleaned up usage output
  all.sh: indent
2017-12-26 10:59:47 +01:00
Manuel Pégourié-Gonnard
465c8b7827 Merge remote-tracking branch 'public/pr/1222' into mbedtls-1.3
* public/pr/1222:
  all.sh: add some documentation
  all.sh: new option --no-armcc
  all.sh: --keep-going mode
  all.sh: cleaned up usage output
  all.sh: indent
2017-12-26 10:59:35 +01:00
Manuel Pégourié-Gonnard
9872634ae8 Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted
* mbedtls-1.3:
  Timing self test: shorten redundant tests
  Timing self test: print some diagnosis information
  get_timer: don't use uninitialized memory
  Timing: fix set_alarm(0) on Unix/POSIX
2017-12-26 10:45:36 +01:00
Manuel Pégourié-Gonnard
bf01b0c0fc Merge remote-tracking branch 'public/pr/1224' into mbedtls-1.3
* public/pr/1224:
  Timing self test: shorten redundant tests
  Timing self test: print some diagnosis information
  get_timer: don't use uninitialized memory
  Timing: fix set_alarm(0) on Unix/POSIX
2017-12-26 10:44:12 +01:00
Gilles Peskine
7d16f8a877 Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted 2017-12-22 11:16:49 +01:00
Gilles Peskine
93c7b3aa27 Merge remote-tracking branch 'upstream-public/pr/1231' into mbedtls-1.3 2017-12-22 11:15:19 +01:00
Gilles Peskine
e8be5e2571 all.sh: add some documentation 2017-12-22 11:02:13 +01:00
Azim Khan
2339966933 Backport: Add option to do baremetal configuration.
Aligned with development branch and added option 'baremetal' that sets configuration for bare metal builds.
2017-12-21 17:23:55 +00:00
Manuel Pégourié-Gonnard
b76115a90a Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted
* mbedtls-1.3:
  compat.sh: use wait_server_start
  wait_server_start: minor efficiency improvement
2017-12-21 11:15:28 +01:00
Manuel Pégourié-Gonnard
a15a41ce48 Merge remote-tracking branch 'public/pr/1217' into mbedtls-1.3
* public/pr/1217:
  compat.sh: use wait_server_start
  wait_server_start: minor efficiency improvement
2017-12-21 11:13:43 +01:00
Gilles Peskine
8833e86dcf Timing self test: shorten redundant tests
We don't need to test multiple delays in a self-test.
Save 10s of busy-wait.
2017-12-20 22:33:11 +01:00
Gilles Peskine
e405069608 Timing self test: print some diagnosis information
Print some not-very-nice-looking but helpful diagnosis information if
the timing selftest fails. Since the failures tend to be due to heavy
system load that's hard to reproduce, this information is necessary to
understand what's going on.
2017-12-20 22:20:30 +01:00
Gilles Peskine
2484ffeb81 get_timer: don't use uninitialized memory
get_timer with reset=1 is called both to initialize a
timer object and to reset an already-initialized object. In an
initial call, the content of the data structure is indeterminate, so
the code should not read from it. This could crash if signed overflows
trap, for example.

As a consequence, on reset, we can't return the previously elapsed
time as was previously done on Windows. Return 0 as was done on Unix.
2017-12-20 22:12:19 +01:00
Gilles Peskine
de896ebd26 Timing: fix set_alarm(0) on Unix/POSIX
The POSIX/Unix implementation of set_alarm did not set the
alarmed flag when called with 0, which was inconsistent
with what the documentation implied and with the Windows behavior.
2017-12-20 22:04:48 +01:00
Gilles Peskine
273ac90383 all.sh: new option --no-armcc
With this option, don't run anything that requires armcc, so
the script can run offline.
2017-12-20 15:32:01 +01:00
Gilles Peskine
ded50da458 all.sh: --keep-going mode
Add --keep-going mode to all.sh. In this mode, if a test fails, keep
running the subsequent tests. If a build fails, skip any tests of this
build and move on to the next tests. Errors in infrastructure, such as
git or cmake runs, remain fatal. Print an error summary at the end of
the run, and return a nonzero code if there was any failure.

In known terminal types, use color to highlight errors.

On a fatal signal, interrupt the run and report the errors so far.
2017-12-20 15:24:51 +01:00
Gilles Peskine
4d4872ae20 all.sh: cleaned up usage output 2017-12-20 14:00:38 +01:00
Gilles Peskine
fb18b6ccd2 all.sh: indent 2017-12-20 14:00:06 +01:00
Gilles Peskine
b2da79c108 Merge remote-tracking branch 'upstream-restricted/pr/435' into mbedtls-1.3-restricted 2017-12-19 19:39:59 +01:00
Gilles Peskine
3ac30e3f7d Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted 2017-12-19 19:01:56 +01:00
Gilles Peskine
605c2284bc Merge branch 'pr_998' into mbedtls-1.3 2017-12-19 18:10:51 +01:00
Gilles Peskine
5a0bc7f142 Added ChangeLog entry 2017-12-19 18:09:34 +01:00
Gilles Peskine
103299edb7 compat.sh: use wait_server_start
Port wait_server_start from ssl-opt.sh to compat.sh, instead of just
using "sleep 1". This solves the problem that on a heavily loaded
machine, sleep 1 is sometimes not enough (we had CI failures because
of this). This is also faster on a lightly-loaded machine.
2017-12-19 13:37:41 +01:00
Gilles Peskine
80f6be76e0 wait_server_start: minor efficiency improvement
In wait_server_start, fork less. When lsof is present, call it on the
expected process. This saves a few percent of execution time on a
lightly loaded machine. Also, sleep for a short duration rather than
using a tight loop.
2017-12-19 13:35:10 +01:00
Manuel Pégourié-Gonnard
90c5e396e0 Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted
* mbedtls-1.3:
  Allow comments in test data files
2017-12-19 12:21:26 +01:00
Manuel Pégourié-Gonnard
b9c40b3157 Merge remote-tracking branch 'public/pr/1119' into mbedtls-1.3
* public/pr/1119:
  Allow comments in test data files
2017-12-19 12:21:07 +01:00
Manuel Pégourié-Gonnard
ba110ba4d2 Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted
* mbedtls-1.3:
  Address PR review comments
  Backport 1.3:Fix crash when calling `mbedtls_ssl_cache_free` twice
2017-12-19 11:44:17 +01:00
Manuel Pégourié-Gonnard
cc3e3b0ace Merge remote-tracking branch 'public/pr/1161' into mbedtls-1.3
* public/pr/1161:
  Address PR review comments
  Backport 1.3:Fix crash when calling `mbedtls_ssl_cache_free` twice
2017-12-19 11:43:57 +01:00
Manuel Pégourié-Gonnard
921eb599f6 Fix magic constant in previous commit 2017-12-19 10:25:51 +01:00
Manuel Pégourié-Gonnard
3ea75b3a9b Fix SSLv3 MAC computation
In a previous PR (Fix heap corruption in implementation of truncated HMAC
extension #425) the place where MAC is computed was changed from the end of
the SSL I/O buffer to a local buffer (then (part of) the content of the local
buffer is either copied to the output buffer of compare to the input buffer).

Unfortunately, this change was made only for TLS 1.0 and later, leaving SSL
3.0 in an inconsistent state due to ssl_mac() still writing to the old,
hard-coded location, which, for MAC verification, resulted in later comparing
the end of the input buffer (containing the computed MAC) to the local buffer
(uninitialised), most likely resulting in MAC verification failure, hence no
interop (even with ourselves).

This commit completes the move to using a local buffer by using this strategy
for SSL 3.0 too. Fortunately ssl_mac() was static so it's not a problem to
change its signature.
2017-12-19 10:25:22 +01:00
Manuel Pégourié-Gonnard
917969e533 Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted
* mbedtls-1.3:
  Fix build without MBEDTLS_FS_IO
2017-12-18 11:45:06 +01:00
Manuel Pégourié-Gonnard
ccbbfdf0d8 Merge remote-tracking branch 'public/pr/1186' into mbedtls-1.3
* public/pr/1186:
  Fix build without MBEDTLS_FS_IO
2017-12-18 11:44:48 +01:00
Gilles Peskine
3790b4714d Merge branch 'mbedtls-1.3' into mbedtls-1.3-restricted 2017-12-04 18:01:40 +00:00
Gilles Peskine
4905e6c4e7 Merge branch 'pr_1045' into mbedtls-1.3 2017-12-04 17:29:13 +01:00
Gilles Peskine
046fff12fa Added ChangeLog entry 2017-12-04 17:26:40 +01:00
Gilles Peskine
6e206364d9 Merge remote-tracking branch 'upstream-public/pr/1175' into mbedtls-1.3 2017-12-04 17:21:09 +01:00
Gilles Peskine
258bf599d6 Merge remote-tracking branch 'upstream-restricted/pr/426' into mbedtls-1.3-restricted 2017-12-01 18:03:15 +01:00