Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1566 commits
Select commit Hold shift + click to select a range
b41194c
Unlinked framework as a submodule.
minosgalanakis Mar 20, 2025
2c824b4
Added framework as a flattened directory
minosgalanakis Mar 20, 2025
22098d4
Add auto-generated files
minosgalanakis Mar 20, 2025
c90c6d8
Deleted flattened framework dir.
minosgalanakis Mar 20, 2025
8cf5666
Restored framework as a submodule
minosgalanakis Mar 20, 2025
a68d1d2
Merge pull request #1328 from Mbed-TLS/mbedtls-3.6.3rc0-pr
minosgalanakis Mar 20, 2025
05657d9
Revert "Add auto-generated files"
minosgalanakis Mar 23, 2025
3b56d92
Merge branch 'mbedtls-3.6.3rc' into mbedtls-3.6.3_mergeback
minosgalanakis Mar 23, 2025
0c0f5f2
Merge pull request #1332 from Mbed-TLS/mbedtls-3.6.3_mergeback
minosgalanakis Mar 24, 2025
9449eed
Update framework pointer
ronald-cron-arm Feb 14, 2025
f810d44
cmake: Generate test_keys.h and test_certs.h in the build tree
ronald-cron-arm Feb 14, 2025
7080752
Add missing credit for set_hostname issue
davidhorstmann-arm Mar 25, 2025
a1dd7fa
Merge pull request #10069 from ronald-cron-arm/check-generated-files-3.6
ronald-cron-arm Mar 27, 2025
3623414
Merge pull request #10092 from davidhorstmann-arm/add-missing-credit-3.6
davidhorstmann-arm Mar 27, 2025
5a5440e
Update to the new name in usages as well
davidhorstmann-arm Mar 28, 2025
d75c4c2
Remove unnecessary TEST_CF_PUBLIC macro call
davidhorstmann-arm Mar 28, 2025
b2b1c3b
Add testcase for maximum padding length
davidhorstmann-arm Mar 28, 2025
bbf1a01
Modify ChangeLog entry to full plaintext recovery
davidhorstmann-arm Mar 28, 2025
850e5b3
Document assumption of mbedtls_get_pkcs_padding
davidhorstmann-arm Mar 28, 2025
49f179d
Always call mbedtls_ssl_handshake_set_state
gilles-peskine-arm Mar 7, 2025
da5f5b2
Add a log message on every SSL state transition
gilles-peskine-arm Mar 7, 2025
adefe78
Document gotcha of move_handshake_to_state
gilles-peskine-arm Mar 7, 2025
39bcbb6
Create handshake record coalescing tests
gilles-peskine-arm Mar 7, 2025
ad84044
Test split, coalesced-split and empty handshake records
gilles-peskine-arm Mar 7, 2025
aa9b455
Pacify ancient clang -Wmissing-initializer
gilles-peskine-arm Mar 7, 2025
544fdc6
Fix printf of enum
gilles-peskine-arm Mar 7, 2025
7cdf563
Fix the build in PSK-only configurations
gilles-peskine-arm Mar 7, 2025
d973387
Fix the build without MBEDTLS_DEBUG_C
gilles-peskine-arm Mar 7, 2025
4f57212
Also test inserting non-empty, non-handshake records
gilles-peskine-arm Mar 10, 2025
f9333a3
Simulate closing the connection mid-message
gilles-peskine-arm Mar 10, 2025
7fe3638
Fix copypasta
gilles-peskine-arm Mar 10, 2025
cb3cabd
Remove redundant setup
gilles-peskine-arm Mar 10, 2025
f267020
Improve documentation
gilles-peskine-arm Mar 10, 2025
05ff37f
Tighten dependency declarations
mpg Mar 26, 2025
063c1ce
Improve dependency declarations
mpg Mar 27, 2025
066ac13
Tighten dependencies again
mpg Mar 27, 2025
fa54778
Use same dependencies for helper functions
mpg Mar 28, 2025
784041a
Adapt dependencies to the 3.6 branch
mpg Apr 1, 2025
e38bc4c
Improve comments
mpg Apr 10, 2025
f1335bc
Use HANDSHAKE_OVER in nominal test cases
mpg Apr 10, 2025
6c5af6c
Update feature macro for 3.6
mpg Apr 10, 2025
ecd5aa3
framework: update reference
valeriosetti Apr 10, 2025
5533cc8
programs: demo: source project_detection.sh
valeriosetti Apr 10, 2025
2e10e78
Merge pull request #10129 from valeriosetti/fix-demo-programs
gilles-peskine-arm Apr 10, 2025
881ebc7
Fix record insertion
mpg Apr 10, 2025
5da6b49
Merge pull request #10110 from mpg/defragment-test-server-first-fligh…
ronald-cron-arm Apr 11, 2025
3302dc6
programs: demo: do not source project_detection.sh directly
valeriosetti Apr 11, 2025
44042f0
Implement TLS-Exporter feature
mfil Jul 22, 2024
90ed7f7
Add TLS-Exporter options to ssl_server2
mfil Jul 22, 2024
de3d5fd
Add TLS-Exporter options to ssl_client2
mfil Jul 22, 2024
91ad62e
Add changelog entry for TLS-Exporter feature
mfil Jul 25, 2024
29f79ea
Fix commented out function declaration
mfil Aug 9, 2024
d3d7ff4
Add test for TLS-Exporter in TLS 1.3
mfil Aug 9, 2024
404f7a3
Simplify mbedtls_ssl_tls13_exporter
mfil Aug 12, 2024
77a447b
Actually set exporter defaults in ssl_client2
mfil Aug 12, 2024
1466bf8
Fix key_len check in TLS-Exporter
mfil Aug 12, 2024
3be83a7
Fix mismatches in function declarations
mfil Aug 14, 2024
5805cc9
Fix typos in comment
mfil Sep 20, 2024
f95bfda
Fix doxygen comment parameter name
mfil Sep 20, 2024
15f9f5e
Fix TLS exporter changelog entry
mfil Sep 20, 2024
9359f4d
Fix coding style
mfil Sep 21, 2024
0118293
Fix build when one of TLS 1.2 or 1.3 is disabled
mfil Sep 21, 2024
c48e9e0
Fix coding style
mfil Sep 21, 2024
85b33ee
Store randbytes for TLS 1.2 TLS-Exporter
mfil Oct 18, 2024
76077e2
Add label length argument to tls_prf_generic()
mfil Oct 23, 2024
6c02ea8
Use fewer magic numbers in TLS-Exporter functions
mfil Oct 23, 2024
948e15d
Fix typos in comments
mfil Oct 23, 2024
92d2930
Revert "Store randbytes for TLS 1.2 TLS-Exporter"
mfil Oct 23, 2024
7b52328
Remove TLS 1.2 Exporter if we don't have randbytes
mfil Oct 23, 2024
951b886
Create MBEDTLS_SSL_KEYING_MATERIAL_EXPORT option
mfil Oct 24, 2024
d97e0e8
Enable MBEDTLS_SSL_KEYING_MATERIAL_EXPORT by default
mfil Oct 28, 2024
8fa7252
Fix #endif comment
mfil Oct 28, 2024
1bc2a9b
Mention MBEDTLS_SSL_KEYING_MATERIAL_EXPORT in change log
mfil Oct 28, 2024
9e23339
Add more tests for keying material export
mfil Oct 29, 2024
ffc47e6
Increase allowed output size of HKDF-Expand-Label
mfil Oct 29, 2024
e95edbf
Fix output size check for key material exporter
mfil Oct 29, 2024
436cc20
Exportert tests: Free endpoints and options
mfil Oct 29, 2024
e825110
Exporter tests: Initialize allocated memory
mfil Oct 29, 2024
538ed71
Coding style cleanup
mfil Oct 29, 2024
81b41d4
Exporter tests: Fix possible uninitialized variable use
mfil Oct 30, 2024
20e4ac8
Exporter tests: Free endpoints before PSA_DONE()
mfil Oct 31, 2024
fb7e578
Exporter tests: Reduce key size in long key tests
mfil Oct 31, 2024
8ee2141
Use one maximum key_len for all exported keys
mfil Nov 1, 2024
2c2a6ac
Exporter tests: Add missing depends-ons
mfil Nov 1, 2024
ede294e
Exporter tests: Don't use unavailbable constant
mfil Nov 5, 2024
c8f936e
mbedtls_test_ssl_do_handshake_with_endpoints: Zeroize endpoints
mfil Nov 8, 2024
9c3a7ba
ssl-opt.sh: Add tests for keying material export
mfil Nov 11, 2024
a442aea
Fix memory leak in example programs
mfil Nov 13, 2024
d22493f
Print names of new tests properly
mfil Nov 13, 2024
0faf5d1
Fix openssl s_client invocation
mfil Nov 14, 2024
e009158
Remove exporter compatibility test for TLS 1.3
mfil Nov 14, 2024
2310c19
Add fixed compatibility test for TLS 1.3 Exporter
mfil Nov 14, 2024
6f7cf0e
Use mbedtls_calloc, not regular calloc
mfil Nov 14, 2024
c361064
Fix requirements for TLS 1.3 Exporter compat test
mfil Nov 14, 2024
97a2879
Document BAD_INPUT_DATA error in key material exporter
mfil Nov 18, 2024
76bb753
Fix max. label length in key material exporter
mfil Nov 21, 2024
6a64f0f
Exporter: Add min. and max. label tests
mfil Nov 25, 2024
529931a
Allow maximum label length in Hkdf-Expand-Label
mfil Nov 25, 2024
7833b18
Fix HkdfLabel comment
mfil Dec 2, 2024
5122dc6
Fix mistake in previous comment change
mfil Dec 2, 2024
0b65a91
Fix doxygen for MBEDTLS_SSL_KEYING_MATERIAL_EXPORT
mfil Jan 17, 2025
820e5cc
Fix dependencies for TLS-Exporter tests
mfil Jan 21, 2025
40c2024
Add label_len argument to non-PSA tls_prf_generic
mfil Apr 15, 2025
1b0e2e9
Add missing ifdef for mbedtls_ssl_tls13_exporter
mfil Apr 16, 2025
1ff1281
Check the status of mbedtls_ssl_set_hostname()
gilles-peskine-arm Apr 8, 2025
0e6032d
Fix some test helper functions returning 0 on some failures
gilles-peskine-arm Apr 8, 2025
e08edcc
Merge pull request #9469 from mfil/feature/backport36_implement_tls_e…
davidhorstmann-arm Apr 17, 2025
afedef5
Constify cipher_wrap:mbedtls_cipher_base_lookup_table
XavierChapron Apr 18, 2025
309ca52
framework: update reference
valeriosetti Apr 11, 2025
74383ab
Merge pull request #10132 from valeriosetti/issue157-3.6
gilles-peskine-arm Apr 18, 2025
8444211
Merge pull request #10137 from gilles-peskine-arm/test_suite_ssl-fix-…
gilles-peskine-arm Apr 23, 2025
0dd76e0
Prepare framework for pylint check-str-concat-over-line-jumps
gilles-peskine-arm Apr 24, 2025
cc4649d
Complain about a missing comma in multiline lists of strings
gilles-peskine-arm Apr 24, 2025
ae18357
Merge pull request #10138 from XavierChapron/xch/constify-mbedtls_cip…
gilles-peskine-arm Apr 24, 2025
cdb3781
Update obsolete section title
gilles-peskine-arm Feb 5, 2025
f5f15aa
Move concurrent tests to a separate .data file
gilles-peskine-arm Feb 5, 2025
ebd0888
Move persistent key tests to a separate .data file
gilles-peskine-arm Feb 5, 2025
451b9ad
Disable warning from gcc -pedantic on dlsym/dlopen
gilles-peskine-arm Jan 8, 2025
94c1b9a
Test with GCC 15
gilles-peskine-arm Dec 7, 2024
bf90dc9
GCC 15: Silence -Wunterminated-string-initialization
gilles-peskine-arm Dec 7, 2024
2eab9fd
Enable drivers when testing with GCC 15
gilles-peskine-arm Feb 5, 2025
df06572
Allow gcc-15 to be in $PATH
gilles-peskine-arm Feb 5, 2025
88f6ce1
Update framework
gilles-peskine-arm Apr 25, 2025
3bd433d
Merge pull request #10150 from gilles-peskine-arm/pylint-check-str-co…
davidhorstmann-arm Apr 28, 2025
15bb8e0
Improve comments
gilles-peskine-arm Apr 30, 2025
19d2c91
Fix undocumented free() in x509_string_to_names()
mpg May 5, 2025
acdcb7f
Restore behaviour of mbedtls_x509write_set_foo_name()
mpg May 5, 2025
4dd52b7
Fix runtime error in cert_write & cert_req
mpg May 5, 2025
0803df2
Fix memory leak in cert_write & cert_req
mpg May 5, 2025
f9ac5e7
Add unit test for new behaviour of string_to_names()
mpg May 5, 2025
219c336
Merge pull request #1306 from davidhorstmann-arm/pkcs7-padding-side-c…
mpg May 6, 2025
f0daff9
Merge pull request #10151 from gilles-peskine-arm/union-initializatio…
gilles-peskine-arm May 7, 2025
a7a480b
Initialize driver context in setup functions
gilles-peskine-arm Feb 5, 2025
bbec1c1
Initialize MAC context in internal functions for KDF
gilles-peskine-arm Feb 5, 2025
0e4907d
Initialize MAC context in internal functions for one-shot MAC
gilles-peskine-arm Feb 5, 2025
f4ebf80
Test with GCC 15 with sloppy union initialization
gilles-peskine-arm May 7, 2025
65b5483
Changelog entry for the union initialization fixes
gilles-peskine-arm Feb 5, 2025
6fb5120
Remove .gitmodules
yanesca May 8, 2025
c5848a5
Merge branch 'mbedtls-3.6.3.1-rc' into mbedtls-3.6.3.1-pr
yanesca May 9, 2025
91b29a0
Grammar in comments
gilles-peskine-arm May 13, 2025
ff32e86
Merge pull request #10170 from yanesca/mbedtls-3.6.3.1-pr
gilles-peskine-arm May 13, 2025
ddbf8d0
Add credit to the reporters of the PKCS7 issue
davidhorstmann-arm May 14, 2025
0d9b00d
cmake: library: Remove unnecessary link_to_source
ronald-cron-arm May 14, 2025
1337d54
Name and document the type of random generator callbacks
gilles-peskine-arm May 16, 2025
060c70e
Reference mbedtls_f_rng_t in public documentation
gilles-peskine-arm May 16, 2025
ed10e2a
Note functions that store the RNG callback in a context
gilles-peskine-arm May 16, 2025
c0b357d
ECDSA is a special flower
gilles-peskine-arm May 16, 2025
addf8fc
Fix ECDSA documentation: blinding is no longer optional
gilles-peskine-arm May 16, 2025
35f2220
Remove redundant free loop
mpg May 19, 2025
8a6fc08
Add comment on apparent type mismatch
mpg May 19, 2025
8429619
Fix type in ChangeLog
mpg May 19, 2025
dad206d
Merge pull request #10168 from gilles-peskine-arm/union-initializatio…
mpg May 19, 2025
e3aaf82
Mark ssl_tls12_preset_default_sig_algs const
rojer Mar 18, 2024
fb5e2e5
Mark ssl_tls12_preset_suiteb_sig_algs const
rojer Mar 20, 2024
1173786
Merge pull request #10185 from rojer/tls_consts_3.6
mpg May 20, 2025
8ac3eb9
Avoid a useless copy in cert_{req,write}
mpg May 21, 2025
1e9267c
Merge pull request #1340 from mpg/fix-string-to-names-uaf-3.6
mpg May 21, 2025
93dd995
Use short initializers for multipart operation structures
gilles-peskine-arm Feb 5, 2025
077f8e6
Restore standard initializers in _init tests
gilles-peskine-arm Feb 5, 2025
13f86e6
Add tests for bug in mbedtls_x509_string_to_names()
mpg May 21, 2025
2df7ab7
Fix bug in mbedtls_asn1_store_named_data()
mpg May 26, 2025
12df5f3
Improve unit tests for mbedtls_asn1_store_named_data
mpg May 26, 2025
04fe95d
Add ChangeLog entry
mpg May 26, 2025
3ea3635
Move the inclusion of crypto_sizes.h and crypto_struct.h in crypto.h
ronald-cron-arm May 28, 2025
4960825
Add change log
ronald-cron-arm May 28, 2025
d9c1417
Merge pull request #1345 from davidhorstmann-arm/pkcs7-side-channel-m…
mpg May 28, 2025
23a0d48
Merge pull request #10196 from ronald-cron-arm/move-crypto-struct-inc…
davidhorstmann-arm May 28, 2025
d3324fd
Move PAKE size calculation macros, cipher suite and operation structs
ronald-cron-arm Jun 2, 2025
3819005
Fix psa_pake_operation_s member types
ronald-cron-arm Jun 2, 2025
e51bde0
Fix possible UB in mbedtls_asn1_write_raw_buffer()
mpg Jun 3, 2025
0050f5f
Update framework with additional operation initialization checks
gilles-peskine-arm Feb 5, 2025
1592639
Merge pull request #10182 from gilles-peskine-arm/f_rng-documentation…
gilles-peskine-arm Jun 3, 2025
9325883
Add test using underflow-causing PEM keyfile
felixc-arm May 27, 2025
6165e71
Add fix for PEM underflow
felixc-arm May 27, 2025
42323ea
Add changelog
felixc-arm May 27, 2025
3f82706
Merge pull request #1349 from felixc-arm/pem-integer-underflow-3.6
davidhorstmann-arm Jun 4, 2025
548e2db
Built-in lms driver: Added input guard
minosgalanakis Jun 2, 2025
caaffc1
Built-in lms/lmots driver: Harden public key import against enum trun…
minosgalanakis Jun 2, 2025
ae449bf
Built-in lms driver:Check return values of Merkle node creation
minosgalanakis Jun 2, 2025
9b3051f
Built-in lms driver: always zeroize output-buffer in create_merkle_le…
minosgalanakis Jun 2, 2025
673e1eb
Fix build test programs in MSVC (due to a warning treated as error in…
aslze Jun 4, 2025
41422e1
Fix change log entry
aslze Jun 4, 2025
3b392af
Added changelog for lms overread
minosgalanakis Jun 2, 2025
3444757
Added changelog for lms enum casting
minosgalanakis Jun 2, 2025
f84bc3f
Added changelog for check return of merkle leaf
minosgalanakis Jun 2, 2025
b725738
test_suite_lms: Added a test for importing invalid sized key
minosgalanakis Jun 2, 2025
c7beb84
test_suite_lms: Added negative test for corrupted Merkle path
minosgalanakis Jun 2, 2025
715bbf3
mbedtls_base64_decode: test the reported output length
gilles-peskine-arm Jun 3, 2025
683a46e
mbedtls_base64_decode: assert sloppy behavior with bad number of =
gilles-peskine-arm Jun 3, 2025
84999d1
Fix mbedtls_base64_decode() accepting invalid inputs with 4n+1 digits
gilles-peskine-arm Jun 4, 2025
582b6fb
We do support builds where NV seed is the only entropy source
gilles-peskine-arm Jun 6, 2025
bd6fb46
Add a build with NV seed as the only entropy source
gilles-peskine-arm Jun 6, 2025
7df273b
Merge remote-tracking branch 'mbedtls-3.6' into mbedtls-3.6-restricted
gilles-peskine-arm Jun 6, 2025
361799a
typo
gilles-peskine-arm Jun 6, 2025
58a4479
test_suite_lms.data: Updated comments
minosgalanakis Jun 6, 2025
df2f0aa
lms.c: Updated documentation
minosgalanakis Jun 6, 2025
255c492
Added CVE's to ChangeLogs
minosgalanakis Jun 8, 2025
2b3d6a8
mbedtls_base64_decode: insist on correct padding
gilles-peskine-arm Jun 4, 2025
e7ed8c4
Explain some aspects of the tests
gilles-peskine-arm Jun 5, 2025
13cc0c2
mbedtls_base64_decode: test dst=NULL with dlen>0
gilles-peskine-arm Jun 5, 2025
8c67ac0
Fix race condition in mbedtls_aesni_has_support
gilles-peskine-arm Jun 9, 2025
55d2113
Adjust test case with invalid base64
gilles-peskine-arm Jun 10, 2025
4c26d7d
Merge pull request #10179 from gilles-peskine-arm/union-initializatio…
mpg Jun 10, 2025
cae4434
Merge pull request #1347 from mpg/fix-asn1-store-named-data-null-dere…
mpg Jun 10, 2025
7ed3653
Merge pull request #1363 from gilles-peskine-arm/3.6-restricted-merge…
mpg Jun 10, 2025
a795252
Merge pull request #1359 from Mbed-TLS/bugfix_1351_1352_1353_lms_driv…
gilles-peskine-arm Jun 10, 2025
f5db3e9
Note that GCM is also impacted
gilles-peskine-arm Jun 11, 2025
2e1399f
Add __attribute__ ((nonstring)) to remove unterminated-string-initial…
felixc-arm Jun 11, 2025
03303d8
Don't mutate dst_size
gilles-peskine-arm Jun 11, 2025
51dccfb
Improve some explanations
gilles-peskine-arm Jun 11, 2025
766be1f
Replace __attribute__((nonstring)) with macro MBEDTLS_ATTRIBUTE_UNTER…
felixc-arm Jun 12, 2025
80ca13f
Add changelog
felixc-arm Jun 12, 2025
853cfbd
Add a note about processor memory reordering
gilles-peskine-arm Jun 12, 2025
b8d1473
Simplify changelog
felixc-arm Jun 13, 2025
d593c54
Merge pull request #10215 from felixc-arm/gcc-15-warning-3.6
mpg Jun 13, 2025
3c9ad42
Merge pull request #1367 from gilles-peskine-arm/aesni_has_support-vo…
gilles-peskine-arm Jun 13, 2025
d1f5169
Remove blank line
ronald-cron-arm Jun 16, 2025
a84be59
Merge pull request #1366 from gilles-peskine-arm/base64-decode-clean-3.6
davidhorstmann-arm Jun 17, 2025
7df8992
fix: additional MSVC v142 build issue with tls1.3 configuration enabled.
ronald-cron-arm Jun 18, 2025
fb2460a
Fixed some minor typos in comments.
ariwo17 Jun 10, 2025
54ceaf7
Merge pull request #10200 from aslze/mbedtls-3.6
davidhorstmann-arm Jun 19, 2025
ed134de
Fixed the same typo in ssl-opt.sh
ariwo17 Jun 11, 2025
bad1679
Update framework pointer (release-sync)
ronald-cron-arm Jun 23, 2025
3527ea9
Merge pull request #10243 from ronald-cron-arm/mbedtls-3.6-release-sync
ronald-cron-arm Jun 23, 2025
ea26c23
Turn Wunterminated-string-initialization back into an error
felixc-arm Jun 23, 2025
5e1e5b3
Merge pull request #10241 from ariwo17/backport-typo-fixes-3.6
davidhorstmann-arm Jun 23, 2025
f362775
Merge remote-tracking branch 'restricted/mbedtls-3.6-restricted' into…
minosgalanakis Jun 23, 2025
971c02c
Fix accidentally skipped test assertion
gilles-peskine-arm Jun 24, 2025
20eee55
Properly initialize SSL endpoint objects
gilles-peskine-arm Jun 24, 2025
b5bb58d
Merge pull request #10249 from gilles-peskine-arm/tls-exporter-coveri…
minosgalanakis Jun 25, 2025
ae9a5e8
Fix accidentally skipped test assertion
gilles-peskine-arm Jun 24, 2025
4cbf802
Properly initialize SSL endpoint objects
gilles-peskine-arm Jun 24, 2025
c52f68f
Assemble ChangeLog
minosgalanakis Jun 23, 2025
5374262
Version bump 3.6.4
minosgalanakis Jun 23, 2025
59e8b3a
Added generated files
minosgalanakis Jun 25, 2025
c765c83
Merge pull request #1373 from Mbed-TLS/mbedtls-3.6.4rc0-pr
minosgalanakis Jun 25, 2025
01b5d6a
Merge pull request #10244 from felixc-arm/gcc-15-remove-wnoerror-3.6
mpg Jun 26, 2025
5b9c7c5
Revert "Added generated files"
minosgalanakis Jun 29, 2025
1a22f21
Merge pull request #1381 from Mbed-TLS/mbedtls-3.6.4-mergeback
minosgalanakis Jun 30, 2025
a329f39
Merge pull request #10210 from gilles-peskine-arm/nv-seed-only-3.6
ronald-cron-arm Jul 2, 2025
ea073d0
Update note about the first 4.x LTS
davidhorstmann-arm Jul 8, 2025
cfbde81
Merge pull request #10287 from davidhorstmann-arm/update-4.x-lts-time…
ronald-cron-arm Jul 9, 2025
22dd793
Freeze cryptography version on the CI at 35.0.0
bensze01 Jul 16, 2025
9ecab50
Don't install cryptography on the FreeBSD CI
bensze01 Jul 16, 2025
222090a
Restrict CI-specific python requirements to Linux
bensze01 Jul 16, 2025
8f4779c
Merge pull request #10303 from bensze01/freebsd-3.6
bensze01 Jul 16, 2025
cbe5fa4
cmake: library: Add custom targets for generated files
ronald-cron-arm May 14, 2025
5491fe3
Add change log
ronald-cron-arm May 14, 2025
8d524e8
Merge pull request #10312 from ronald-cron-arm/dependency-on-generate…
gilles-peskine-arm Jul 30, 2025
6ab75a8
Test HMAC with key size reaching the block size
gilles-peskine-arm Aug 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
seedfile
# MBEDTLS_PSA_INJECT_ENTROPY seed file created by the test framework
00000000ffffff52.psa_its
# Log files created by all.sh to reduce the logs in case a component runs
# successfully
quiet-make.*

# CMake build artifacts:
CMakeCache.txt
Expand Down Expand Up @@ -32,6 +35,7 @@ massif-*

# Unix-like build artifacts:
*.o
*.s

# MSVC build artifacts:
*.exe
Expand Down Expand Up @@ -67,3 +71,6 @@ massif-*
compile_commands.json
# clangd index files
/.cache/clangd/index/

# VScode folder to store local debug files and configurations
.vscode
2 changes: 1 addition & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[mypy]
mypy_path = scripts
mypy_path = framework/scripts:scripts
namespace_packages = True
warn_unused_configs = True
13 changes: 12 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[MASTER]
init-hook='import sys; sys.path.append("scripts")'
init-hook='import sys; sys.path.append("scripts"); sys.path.append("framework/scripts")'
min-similarity-lines=10

[BASIC]
Expand Down Expand Up @@ -70,6 +70,17 @@ disable=locally-disabled,locally-enabled,logging-format-interpolation,no-else-re
# Don't diplay statistics. Just the facts.
reports=no

[STRING]
# Complain about
# ```
# list_of_strings = [
# 'foo' # <-- missing comma
# 'bar',
# 'corge',
# ]
# ```
check-str-concat-over-line-jumps=yes

[VARIABLES]
# Allow unused variables if their name starts with an underscore.
# [unused-argument]
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build:
python: "3.9"
jobs:
pre_build:
- ./scripts/apidoc_full.sh
- ./framework/scripts/apidoc_full.sh
- breathe-apidoc -o docs/api apidoc/xml
post_build:
- |
Expand Down
2 changes: 2 additions & 0 deletions 3rdparty/everest/include/everest/kremlin/c_endianness.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <string.h>
#include <inttypes.h>

#include "kremlin/internal/callconv.h"

/******************************************************************************/
/* Implementing C.fst (part 2: endian-ness macros) */
/******************************************************************************/
Expand Down
4 changes: 3 additions & 1 deletion 3rdparty/everest/include/everest/kremlin/internal/callconv.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
/* Since KreMLin emits the inline keyword unconditionally, we follow the
* guidelines at https://gcc.gnu.org/onlinedocs/gcc/Inline.html and make this
* __inline__ to ensure the code compiles with -std=c90 and earlier. */
#ifdef __GNUC__
#if defined(__GNUC__)
# define inline __inline__
#elif defined(_MSC_VER)
# define inline __inline
#endif

/* GCC-specific attribute syntax; everyone else gets the standard C inline
Expand Down
36 changes: 0 additions & 36 deletions 3rdparty/everest/include/everest/vs2013/inttypes.h

This file was deleted.

31 changes: 0 additions & 31 deletions 3rdparty/everest/include/everest/vs2013/stdbool.h

This file was deleted.

1 change: 1 addition & 0 deletions 3rdparty/p256-m/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Makefile
14 changes: 8 additions & 6 deletions BRANCHES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ ABI compatibility within LTS branches; see the next section for details.

We will make regular LTS releases on an 18-month cycle, each of which will have
a 3 year support lifetime. On this basis, 3.6 LTS (released March 2024) will be
supported until March 2027. The next LTS release will be a 4.x release, which is
planned for September 2025.
supported until March 2027. The next LTS release will be a 4.x release. Due to
the size and scope of the 4.0 release, the release date of the first 4.x LTS is
yet to be determined.

## Backwards Compatibility for application code

Expand Down Expand Up @@ -107,9 +108,10 @@ The following branches are currently maintained:
- [`development`](https://github.com/Mbed-TLS/mbedtls/)
- [`mbedtls-3.6`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-3.6)
maintained until March 2027, see
<https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.6.0>.
- [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28)
maintained until the end of 2024, see
<https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.8>.
<https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.6.3>.

> Note: [**`mbedtls-2.28.10`**](https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.10)
is the last release of the 2.28 LTS and won't receive bug fixes or security fixes anymore.
Users are advised to upgrade to a maintained version.

Users are urged to always use the latest version of a maintained branch.
105 changes: 90 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cmake_minimum_required(VERSION 3.5.1)

include(CMakePackageConfigHelpers)

# Include convenience functions for printing properties and variables, like
# cmake_print_properties(), cmake_print_variables().
include(CMakePrintHelpers)

# https://cmake.org/cmake/help/latest/policy/CMP0011.html
# Setting this policy is required in CMake >= 3.18.0, otherwise a warning is generated. The OLD
# policy setting is deprecated, and will be removed in future versions.
Expand All @@ -36,12 +40,12 @@ cmake_policy(SET CMP0012 NEW)
if(TEST_CPP)
project("Mbed TLS"
LANGUAGES C CXX
VERSION 3.6.0
VERSION 3.6.4
)
else()
project("Mbed TLS"
LANGUAGES C
VERSION 3.6.0
VERSION 3.6.4
)
endif()

Expand All @@ -57,6 +61,7 @@ endif()

# Set the project root directory.
set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(MBEDTLS_FRAMEWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/framework)

option(ENABLE_PROGRAMS "Build Mbed TLS programs." ON)

Expand All @@ -73,10 +78,16 @@ endif()

option(DISABLE_PACKAGE_CONFIG_AND_INSTALL "Disable package configuration, target export and installation" ${MBEDTLS_AS_SUBPROJECT})

string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")
string(REGEX MATCH "GNU" CMAKE_COMPILER_IS_GNU "${CMAKE_C_COMPILER_ID}")
string(REGEX MATCH "IAR" CMAKE_COMPILER_IS_IAR "${CMAKE_C_COMPILER_ID}")
string(REGEX MATCH "MSVC" CMAKE_COMPILER_IS_MSVC "${CMAKE_C_COMPILER_ID}")
if (CMAKE_C_SIMULATE_ID)
set(COMPILER_ID ${CMAKE_C_SIMULATE_ID})
else()
set(COMPILER_ID ${CMAKE_C_COMPILER_ID})
endif(CMAKE_C_SIMULATE_ID)

string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${COMPILER_ID}")
string(REGEX MATCH "GNU" CMAKE_COMPILER_IS_GNU "${COMPILER_ID}")
string(REGEX MATCH "IAR" CMAKE_COMPILER_IS_IAR "${COMPILER_ID}")
string(REGEX MATCH "MSVC" CMAKE_COMPILER_IS_MSVC "${COMPILER_ID}")

# the test suites currently have compile errors with MSVC
if(CMAKE_COMPILER_IS_MSVC)
Expand Down Expand Up @@ -184,8 +195,6 @@ function(get_name_without_last_ext dest_var full_name)
set(${dest_var} ${no_ext_name} PARENT_SCOPE)
endfunction(get_name_without_last_ext)

string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")

include(CheckCCompilerFlag)

set(CMAKE_C_EXTENSIONS OFF)
Expand All @@ -196,7 +205,7 @@ if(CMAKE_COMPILER_IS_GNU)
# note: starting with CMake 2.8 we could use CMAKE_C_COMPILER_VERSION
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wmissing-prototypes")
if (GCC_VERSION VERSION_GREATER 3.0 OR GCC_VERSION VERSION_EQUAL 3.0)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat=2 -Wno-format-nonliteral")
endif()
Expand All @@ -221,7 +230,21 @@ if(CMAKE_COMPILER_IS_GNU)
set(CMAKE_C_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage")
set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3")
# Old GCC versions hit a performance problem with test_suite_pkwrite
# "Private keey write check EC" tests when building with Asan+UBSan
# and -O3: those tests take more than 100x time than normal, with
# test_suite_pkwrite taking >3h on the CI. Observed with GCC 5.4 on
# Ubuntu 16.04 x86_64 and GCC 6.5 on Ubuntu 18.04 x86_64.
# GCC 7.5 and above on Ubuntu 18.04 appear fine.
# To avoid the performance problem, we use -O2 when GCC version is lower than 7.0.
# It doesn't slow down much even with modern compiler versions.
if (GCC_VERSION VERSION_LESS 7.0)
message(STATUS "USING O2")
set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O2")
else()
message(STATUS "USING O3")
set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3")
endif()
set(CMAKE_C_FLAGS_ASANDBG "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls")
set(CMAKE_C_FLAGS_TSAN "-fsanitize=thread -O3")
set(CMAKE_C_FLAGS_TSANDBG "-fsanitize=thread -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls")
Expand All @@ -230,7 +253,7 @@ if(CMAKE_COMPILER_IS_GNU)
endif(CMAKE_COMPILER_IS_GNU)

if(CMAKE_COMPILER_IS_CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wwrite-strings -Wmissing-prototypes -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral")
set(CMAKE_C_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage")
Expand Down Expand Up @@ -273,6 +296,15 @@ if(MBEDTLS_FATAL_WARNINGS)
endif(CMAKE_COMPILER_IS_IAR)
endif(MBEDTLS_FATAL_WARNINGS)

if(CMAKE_BUILD_TYPE STREQUAL "Check" AND TEST_CPP)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNU)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
endif()
endif()

if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
if(CMAKE_COMPILER_IS_GNU OR CMAKE_COMPILER_IS_CLANG)
set(CMAKE_SHARED_LINKER_FLAGS "--coverage")
Expand All @@ -284,7 +316,11 @@ if(LIB_INSTALL_DIR)
endif()

if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/framework/CMakeLists.txt")
message(FATAL_ERROR "${CMAKE_CURRENT_SOURCE_DIR}/framework/CMakeLists.txt not found. Run `git submodule update --init` from the source tree to fetch the submodule contents.")
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
message(FATAL_ERROR "${CMAKE_CURRENT_SOURCE_DIR}CMakeLists.txt not found (and does appear to be a git checkout). Run `git submodule update --init` from the source tree to fetch the submodule contents.")
else ()
message(FATAL_ERROR "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt not found (and does not appear to be a git checkout). Please ensure you have downloaded the right archive from the release page on GitHub.")
endif()
endif()
add_subdirectory(framework)

Expand All @@ -297,7 +333,7 @@ add_subdirectory(library)
add_subdirectory(pkgconfig)

#
# The C files in tests/src directory contain test code shared among test suites
# The C files in framework/tests/src directory contain test code shared among test suites
# and programs. This shared test code is compiled and linked to test suites and
# programs objects as a set of compiled objects. The compiled objects are NOT
# built into a library that the test suite and program objects would link
Expand All @@ -313,9 +349,44 @@ add_subdirectory(pkgconfig)
if(ENABLE_TESTING OR ENABLE_PROGRAMS)
file(GLOB MBEDTLS_TEST_FILES
${CMAKE_CURRENT_SOURCE_DIR}/tests/src/*.c
${CMAKE_CURRENT_SOURCE_DIR}/tests/src/drivers/*.c)
${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/src/*.c
${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/src/drivers/*.c)
add_library(mbedtls_test OBJECT ${MBEDTLS_TEST_FILES})
if(GEN_FILES)
add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/tests/include/test/test_keys.h
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/tests/include/test
COMMAND
"${MBEDTLS_PYTHON_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/framework/scripts/generate_test_keys.py"
"--output"
"${CMAKE_CURRENT_BINARY_DIR}/tests/include/test/test_keys.h"
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/framework/scripts/generate_test_keys.py
)
add_custom_target(test_keys_header
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tests/include/test/test_keys.h)
add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/tests/include/test/test_certs.h
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/tests/include/test
WORKING_DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/tests
COMMAND
"${MBEDTLS_PYTHON_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/framework/scripts/generate_test_cert_macros.py"
"--output"
"${CMAKE_CURRENT_BINARY_DIR}/tests/include/test/test_certs.h"
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/framework/scripts/generate_test_cert_macros.py
)
add_custom_target(test_certs_header DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tests/include/test/test_certs.h)
add_dependencies(mbedtls_test test_keys_header test_certs_header)
endif()
target_include_directories(mbedtls_test
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/tests/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library)
Expand All @@ -326,6 +397,7 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
${CMAKE_CURRENT_SOURCE_DIR}/tests/src/test_helpers/*.c)
add_library(mbedtls_test_helpers OBJECT ${MBEDTLS_TEST_HELPER_FILES})
target_include_directories(mbedtls_test_helpers
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library
Expand All @@ -347,6 +419,9 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
endif()

if(ENABLE_PROGRAMS)
set(ssl_opt_target "${MBEDTLS_TARGET_PREFIX}ssl-opt")
add_custom_target(${ssl_opt_target})

add_subdirectory(programs)
endif()

Expand Down Expand Up @@ -401,7 +476,7 @@ if(NOT DISABLE_PACKAGE_CONFIG_AND_INSTALL)
write_basic_package_version_file(
"cmake/MbedTLSConfigVersion.cmake"
COMPATIBILITY SameMajorVersion
VERSION 3.6.0)
VERSION 3.6.4)

install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/MbedTLSConfig.cmake"
Expand Down
Loading