Dave Rodgman
8f109fc249
Fix use of uninitialised variable
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-31 17:07:04 +01:00
Dave Rodgman
b2e3c7af2d
Tidy-up
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-31 16:43:40 +01:00
Dave Rodgman
3fead76eba
Test that setting reset actually does something
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-31 16:43:34 +01:00
Dave Rodgman
8dde24eb08
Tidy-up
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-31 16:24:04 +01:00
Dave Rodgman
42a5bb16c6
Fix failure to write back when reset != 0; tidy-up
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-31 16:20:32 +01:00
Dave Rodgman
0feecbd6f3
Copy the struct to align it, avoiding an ABI break
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-31 16:10:18 +01:00
Dave Rodgman
1a0a2c6baa
Fix cast alignment warning in timing.c
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-31 11:40:24 +01:00
Manuel Pégourié-Gonnard
616f23e016
Merge pull request #7338 from yanrayw/2.28-6500-gitignore-fix
...
Backport 2.28: fix: ignore *.o under tests/src/test_helpers
2023-03-30 23:21:53 +02:00
Dave Rodgman
87af9c38d6
Merge pull request #7310 from Mbed-TLS/2.28-sphinx-versioned-documentation
...
[Backport 2.28] Generate API documentation with Sphinx and Breathe
2023-03-29 14:43:08 +01:00
David Horstmann
4b30783be4
Add _build/ and api/ to gitignore
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-03-28 15:01:34 +01:00
David Horstmann
9a2ddfd147
Clean the breathe-apidoc files with make clean
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-03-28 15:01:34 +01:00
Paul Elliott
640d07e198
Merge pull request #1011 from paul-elliott-arm/mbedtls-2.28.3_mergeback
...
Mbedtls 2.28.3 merge back
2023-03-28 13:44:34 +01:00
David Horstmann
66ef2a06d5
Revert "Add exemption for make.bat in checks for tabs"
...
This is no longer needed as make.bat has been removed. We do not support
building the documentation on Windows.
This reverts commit d50daedccace24bf69903ff7879bc0543757f5ef.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-03-27 15:39:13 +01:00
David Horstmann
042d845e08
Remove make.bat for documentation
...
Building the docs on Windows is not supported in any case, as the apidoc
target in the main Makefile will not run on Windows.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-03-27 15:39:13 +01:00
David Horstmann
1c40d751b4
Improve docs Makefile to do full build
...
Include the make apidoc and breathe-apidoc steps in the documentation
Makefile for ease of use. In this way, depart from the Makefile
generated automatically by Sphinx.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-03-27 15:39:13 +01:00
David Horstmann
f15b7b6300
Improve positioning of GENERATE_XML option
...
It is clearer to have this option next to the GENERATE_LATEX option.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-03-27 15:39:11 +01:00
David Horstmann
e760c797e0
Remove Exhale from requirements and regenerate
...
Regenerate the requirements.txt with Exhale removed and also with Python
3.9 instead of 3.8, for parity with Read The Docs.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2023-03-27 15:36:39 +01:00
Paul Elliott
981743de6f
Merge pull request #1009 from paul-elliott-arm/mbedtls-2.28.3rc0-pr
...
Mbedtls 2.28.3rc0 pr - DO NOT MERGE
2023-03-24 15:54:53 +00:00
Yanray Wang
d82879edc6
tests/.gitignore: ignore *.o under tests/src/test_helpers
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-03-24 18:21:48 +08:00
Dave Rodgman
e4f1aac0fd
Bump version to 2.28.3
...
Command used: ./scripts/bump_version.sh --version 2.28.3
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-03-23 18:06:54 +00:00
Paul Elliott
2454a16fdd
Update BRANCHES.md
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-03-23 11:27:21 +00:00
Paul Elliott
f18db1f631
Assemble changelog for 2.28.3 release
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-03-23 11:26:53 +00:00
Paul Elliott
0e4a4c570e
Fix changelog formatting
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-03-23 11:21:38 +00:00
Paul Elliott
f10eb92751
Rename misnamed changelog entries
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-03-23 11:18:17 +00:00
Tom Cosgrove
9bf344fddd
Add security entry to ChangeLog for AES-NI
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-23 11:14:27 +00:00
Paul Elliott
a183e1d53d
Merge branch 'mbedtls-2.28-restricted' into mbedtls-2.28.3rc0-pr
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-03-21 15:34:35 +00:00
Paul Elliott
18573354f7
Merge pull request #7276 from yanrayw/2.28-6173-split-TLS-connection-func-into-ssl_helpers
...
Backport 2.28: Move TLS connection helper code from test_suite_ssl.function to ssl_helpers.c
2023-03-21 10:54:06 +00:00
Paul Elliott
fc28ffa4c8
Merge pull request #7320 from tom-cosgrove-arm/static-assert-2.28
...
Backport 2.28: Implement and use MBEDTLS_STATIC_ASSERT()
2023-03-20 22:55:32 +00:00
Dave Rodgman
61495ba7cf
Merge pull request #1003 from tom-cosgrove-arm/aesni-intrinsics-2.28
...
Backport 2.28: Implement AESNI with intrinsics
2023-03-20 18:20:47 +00:00
Tom Cosgrove
410594c002
Have MBEDTLS_STATIC_ASSERT() match current development more closely
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-20 15:10:11 +00:00
Tom Cosgrove
bdd01a74ef
Implement and use MBEDTLS_STATIC_ASSERT()
...
Fixes #3693
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-20 15:08:21 +00:00
Tom Cosgrove
b5eb831803
Add tests for unaligned AES contexts
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-20 10:57:42 +00:00
Tom Cosgrove
640b761e49
Print out AESNI mechanism used by GCM in self-test
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-19 15:07:06 +00:00
Tom Cosgrove
2c942a35ff
Fix code style nit
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-19 14:04:04 +00:00
Tom Cosgrove
9149e12767
Stop selftest hanging when run on CI
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-18 14:49:07 +00:00
Tom Cosgrove
20458c0963
Have selftest print more information about the AESNI build
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-18 14:48:49 +00:00
Tom Cosgrove
e0c75342fc
Fix another backport issue: it's VS2010/ not VS2013/
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-18 13:54:26 +00:00
Tom Cosgrove
3b53caed9f
Remove references to MBEDTLS_AESCE_C and MBEDTLS_HAVE_ARM64
...
that aren't needed in this backport
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-17 18:25:36 +00:00
Tom Cosgrove
779199faac
Document that MBEDTLS_AESNI_HAVE_INTRINSICS and MBEDTLS_AESNI_HAVE_CODE are internal
...
macros, despite appearing in a public header file.
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-17 17:16:53 +00:00
Tom Cosgrove
58550acba0
Fix merge errors in backporting
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-03-17 16:54:59 +00:00
Gilles Peskine
9494a99c2f
Fix preprocessor conditional
...
This was intended as an if-else-if chain. Make it so.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-17 16:36:05 +00:00
Gilles Peskine
3efd3149f8
Finish sentence in comment
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-17 16:35:54 +00:00
Gilles Peskine
9a8bf9f85d
Announce the expanded AESNI support
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-17 16:32:03 +00:00
Gilles Peskine
e5038c666e
Document the new state of AESNI support
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-17 16:32:01 +00:00
Gilles Peskine
6dec541e68
AESNI: Overhaul implementation selection
...
Have clearly separated code to:
* determine whether the assembly-based implementation is available;
* determine whether the intrinsics-based implementation is available;
* select one of the available implementations if any.
Now MBEDTLS_AESNI_HAVE_CODE can be the single interface for aes.c and
aesni.c to determine which AESNI is built.
Change the implementation selection: now, if both implementations are
available, always prefer assembly. Before, the intrinsics were used if
available. This preference is to minimize disruption, and will likely
be revised in a later minor release.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-17 16:31:59 +00:00
Gilles Peskine
b71d40228d
Clean up AES context alignment code
...
Use a single auxiliary function to determine rk_offset, covering both
setkey_enc and setkey_dec, covering both AESNI and PADLOCK. For AESNI, only
build this when using the intrinsics-based implementation, since the
assembly implementation supports unaligned access.
Simplify "do we need to realign?" to "is the desired offset now equal to
the current offset?".
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-17 16:31:58 +00:00
Gilles Peskine
3ba81d3217
Remove the dependency of MBEDTLS_AESNI_C on MBEDTLS_HAVE_ASM
...
AESNI can now be implemented with intrinsics.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-17 16:31:55 +00:00
Gilles Peskine
30c356c540
Use consistent guards for padlock code
...
The padlock feature is enabled if
```
defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_HAVE_X86)
```
with the second macro coming from `padlock.h`. The availability of the
macro `MBEDTLS_PADLOCK_ALIGN16` is coincidentally equivalent to
`MBEDTLS_HAVE_X86` but this is not meaningful.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-17 16:31:38 +00:00
Gilles Peskine
6978e73939
Fix unaligned access if the context is moved during operation
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-17 16:31:34 +00:00
Gilles Peskine
5f1677f582
Fix typo in comment
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-03-17 16:31:31 +00:00