Jerry Yu 
							
						 
					 
					
						
						
							
						
						6848a61922 
					 
					
						
						
							
							Revert "Replace internal usage of mbedtls_ssl_is_handshake_over"  
						
						... 
						
						
						
						This reverts commit 1d3ed2975e7ef0d84050a3aece02eec1f890dec3.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-11-19 20:12:34 +08:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						e219c11b4e 
					 
					
						
						
							
							Replace internal usage of mbedtls_ssl_is_handshake_over  
						
						... 
						
						
						
						Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-11-19 20:12:34 +08:00 
						 
				 
			
				
					
						
							
							
								Valerio Setti 
							
						 
					 
					
						
						
							
						
						61ea17d30a 
					 
					
						
						
							
							tls: psa_pake: fix return values in parse functions  
						
						... 
						
						
						
						Ensure they all belong to the MBEDTLS_ERR_SSL_* group
Signed-off-by: Valerio Setti <vsetti@baylibre.com > 
						
						
					 
					
						2022-11-18 12:11:00 +01:00 
						 
				 
			
				
					
						
							
							
								Valerio Setti 
							
						 
					 
					
						
						
							
						
						aca21b717c 
					 
					
						
						
							
							tls: psa_pake: enforce not empty passwords  
						
						... 
						
						
						
						Signed-off-by: Valerio Setti <vsetti@baylibre.com > 
						
						
					 
					
						2022-11-17 18:20:50 +01:00 
						 
				 
			
				
					
						
							
							
								Valerio Setti 
							
						 
					 
					
						
						
							
						
						819de86895 
					 
					
						
						
							
							tls: removed extra white spaces and other minor fix  
						
						... 
						
						
						
						Signed-off-by: Valerio Setti <vsetti@baylibre.com > 
						
						
					 
					
						2022-11-17 18:05:19 +01:00 
						 
				 
			
				
					
						
							
							
								Valerio Setti 
							
						 
					 
					
						
						
							
						
						6b3dab03b5 
					 
					
						
						
							
							tls: psa_pake: use a single function for round one and two in key exchange read/write  
						
						... 
						
						
						
						Signed-off-by: Valerio Setti <vsetti@baylibre.com > 
						
						
					 
					
						2022-11-17 17:14:54 +01:00 
						 
				 
			
				
					
						
							
							
								Valerio Setti 
							
						 
					 
					
						
						
							
						
						9bed8ec5d8 
					 
					
						
						
							
							tls: psa_pake: make round two reading function symmatric to the writing one  
						
						... 
						
						
						
						Signed-off-by: Valerio Setti <vsetti@baylibre.com > 
						
						
					 
					
						2022-11-17 16:36:19 +01:00 
						 
				 
			
				
					
						
							
							
								Valerio Setti 
							
						 
					 
					
						
						
							
						
						30ebe11f86 
					 
					
						
						
							
							tls: psa_pake: add a check on read size on both rounds  
						
						... 
						
						
						
						Signed-off-by: Valerio Setti <vsetti@baylibre.com > 
						
						
					 
					
						2022-11-17 16:35:02 +01:00 
						 
				 
			
				
					
						
							
							
								Valerio Setti 
							
						 
					 
					
						
						
							
						
						a08b1a40a0 
					 
					
						
						
							
							tls: psa_pake: move move key exchange read/write functions to ssl_tls.c  
						
						... 
						
						
						
						Inlined functions might cause the compiled code to have different sizes
depending on the usage and this not acceptable in some cases.
Therefore read/write functions used in the initial key exchange are
moved to a standard C file.
Signed-off-by: Valerio Setti <vsetti@baylibre.com > 
						
						
					 
					
						2022-11-17 16:34:59 +01:00 
						 
				 
			
				
					
						
							
							
								Valerio Setti 
							
						 
					 
					
						
						
							
						
						02c25b5f83 
					 
					
						
						
							
							tls12: psa_pake: use common code for parsing/writing round one and round two data  
						
						... 
						
						
						
						Share a common parsing code for both server and client for parsing
round one and two.
Signed-off-by: Valerio Setti <vsetti@baylibre.com > 
						
						
					 
					
						2022-11-16 13:56:12 +01:00 
						 
				 
			
				
					
						
							
							
								Paul Elliott 
							
						 
					 
					
						
						
							
						
						aeb8bf2ab0 
					 
					
						
						
							
							Merge pull request  #6170  from yuhaoth/pr/tls13-cleanup-extensions-parser  
						
						... 
						
						
						
						TLS 1.3: Add extension check for message parsers 
						
						
					 
					
						2022-11-11 19:00:46 +00:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						97be6a913e 
					 
					
						
						
							
							fix various issues  
						
						... 
						
						
						
						- typo error
- replace `ssl->hanshake` with handshake
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-11-09 22:43:31 +08:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						7de2ff0310 
					 
					
						
						
							
							Refactor extension list print  
						
						... 
						
						
						
						Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-11-08 23:51:39 +08:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						79aa721ade 
					 
					
						
						
							
							Rename ext print function and macro  
						
						... 
						
						
						
						Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-11-08 23:51:39 +08:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						b95dd3683b 
					 
					
						
						
							
							Add missing mask set and tls13 unrecognized extension  
						
						... 
						
						
						
						Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-11-08 23:51:38 +08:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						ea52ed91cf 
					 
					
						
						
							
							fix typo and spell issues  
						
						... 
						
						
						
						Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-11-08 21:01:17 +08:00 
						 
				 
			
				
					
						
							
							
								Dave Rodgman 
							
						 
					 
					
						
						
							
						
						ae2635df6f 
					 
					
						
						
							
							Merge pull request  #6306  from tom-cosgrove-arm/issue-6305-fix  
						
						... 
						
						
						
						Return an error from mbedtls_ssl_handshake_step() if neither client nor server 
						
						
					 
					
						2022-11-08 10:54:17 +00:00 
						 
				 
			
				
					
						
							
							
								Neil Armstrong 
							
						 
					 
					
						
						
							
						
						ca7d506556 
					 
					
						
						
							
							Use PSA PAKE API when MBEDTLS_USE_PSA_CRYPTO is selected  
						
						... 
						
						
						
						Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Signed-off-by: Valerio Setti <vsetti@baylibre.com > 
						
						
					 
					
						2022-11-08 10:58:45 +01:00 
						 
				 
			
				
					
						
							
							
								Gilles Peskine 
							
						 
					 
					
						
						
							
						
						bf249accc7 
					 
					
						
						
							
							Merge pull request  #6498  from yuhaoth/pr/fix-session-resumption-fail-when-hostname-is-not-localhost  
						
						... 
						
						
						
						BUG: Fix session resumption fail when hostname is not localhost 
						
						
					 
					
						2022-11-07 17:33:38 +01:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						4b8f2f7266 
					 
					
						
						
							
							Refactor sent extension message output  
						
						... 
						
						
						
						Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-11-06 11:54:21 +08:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						d25cab0327 
					 
					
						
						
							
							Refactor debug helpers for exts and hs message  
						
						... 
						
						
						
						Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-11-06 11:54:21 +08:00 
						 
				 
			
				
					
						
							
							
								Dave Rodgman 
							
						 
					 
					
						
						
							
						
						29b9b2b699 
					 
					
						
						
							
							Fix zeroization at NULL pointer  
						
						... 
						
						
						
						Signed-off-by: Dave Rodgman <dave.rodgman@arm.com > 
						
						
					 
					
						2022-11-01 16:08:14 +00:00 
						 
				 
			
				
					
						
							
							
								Dave Rodgman 
							
						 
					 
					
						
						
							
						
						e8734d8a55 
					 
					
						
						
							
							Apply suggestions from code review  
						
						... 
						
						
						
						Two spelling fixes (changelog & a comment)
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com > 
						
						
					 
					
						2022-10-31 14:30:24 +00:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						7a485c1fdf 
					 
					
						
						
							
							Add ext id and utilities  
						
						... 
						
						
						
						- Remove `MBEDTLS_SSL_EXT_*`
- Add macros and functions for translating iana identifer.
- Add internal identity for extension
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-10-31 16:41:42 +08:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						c4bf5d658e 
					 
					
						
						
							
							fix various issues  
						
						... 
						
						
						
						- Signature of
  - mbedtls_tls13_set_hs_sent_ext_mask
  - check_received_extension and issues
- Also fix comment issue.
- improve readablity.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-10-31 16:41:42 +08:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						0c354a211b 
					 
					
						
						
							
							introduce sent/recv extensions field  
						
						... 
						
						
						
						And remove `extensions_present`
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-10-31 16:41:42 +08:00 
						 
				 
			
				
					
						
							
							
								Jerry Yu 
							
						 
					 
					
						
						
							
						
						def7ae4404 
					 
					
						
						
							
							Add auth mode check  
						
						... 
						
						
						
						Signed-off-by: Jerry Yu <jerry.h.yu@arm.com > 
						
						
					 
					
						2022-10-30 17:57:06 +08:00 
						 
				 
			
				
					
						
							
							
								Ronald Cron 
							
						 
					 
					
						
						
							
						
						77e15e8a2c 
					 
					
						
						
							
							Merge pull request  #6460  from xkqian/tls13_add_early_data_preparatory  
						
						... 
						
						
						
						Internal and Open CI merge job ran successfully. Good to go. 
						
						
					 
					
						2022-10-27 10:40:56 +02:00 
						 
				 
			
				
					
						
							
							
								Gilles Peskine 
							
						 
					 
					
						
						
							
						
						88f5fd9099 
					 
					
						
						
							
							Merge pull request  #6479  from AndrzejKurek/depends-py-no-psa  
						
						... 
						
						
						
						Enable running depends.py in a configuration without MBEDTLS_USE_PSA_CRYPTO and remove perl dependency scripts 
						
						
					 
					
						2022-10-26 20:02:57 +02:00 
						 
				 
			
				
					
						
							
							
								Xiaokang Qian 
							
						 
					 
					
						
						
							
						
						72dbfef6e4 
					 
					
						
						
							
							Improve coding styles  
						
						... 
						
						
						
						Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com > 
						
						
					 
					
						2022-10-26 06:33:57 +00:00 
						 
				 
			
				
					
						
							
							
								Gilles Peskine 
							
						 
					 
					
						
						
							
						
						744fd37d23 
					 
					
						
						
							
							Merge pull request  #6467  from davidhorstmann-arm/fix-unusual-macros-0  
						
						... 
						
						
						
						Fix unusual macros 
						
						
					 
					
						2022-10-25 19:55:29 +02:00 
						 
				 
			
				
					
						
							
							
								Xiaokang Qian 
							
						 
					 
					
						
						
							
						
						72de95dcf5 
					 
					
						
						
							
							Move function mbedtls_ssl_tls13_conf_early_data to ssl_tls.c  
						
						... 
						
						
						
						Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com > 
						
						
					 
					
						2022-10-25 05:34:25 +00:00 
						 
				 
			
				
					
						
							
							
								Andrzej Kurek 
							
						 
					 
					
						
						
							
						
						409248a73a 
					 
					
						
						
							
							mbedtls_ssl_get_handshake_transcript is unusable without hashes  
						
						... 
						
						
						
						Mark unused variables when compiling without
SHA256 and SHA384. In future a proper dependency
will be added to TLS 1.2 to enforce either of these hashes
to be on.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com > 
						
						
					 
					
						2022-10-24 15:56:10 -04:00 
						 
				 
			
				
					
						
							
							
								Andrzej Kurek 
							
						 
					 
					
						
						
							
						
						57d1063db9 
					 
					
						
						
							
							Fix tls_prf generic dependencies  
						
						... 
						
						
						
						One version was already surrounded by the USE_PSA define,
so the VIA_XX_OR_XX macros were removed;
Second version is when USE_PSA is undefined, so MBEDTLS_
macros can be used. 
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com > 
						
						
					 
					
						2022-10-24 15:56:10 -04:00 
						 
				 
			
				
					
						
							
							
								Ronald Cron 
							
						 
					 
					
						
						
							
						
						73fe8df922 
					 
					
						
						
							
							Introduce and use MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED  
						
						... 
						
						
						
						Introduce and use
MBEDTLS_SSL_HANDSHAKE_WITH_PSK_ENABLED to
guard TLS code (both 1.2 and 1.3) specific
to handshakes involving PSKs.
Signed-off-by: Ronald Cron <ronald.cron@arm.com > 
						
						
					 
					
						2022-10-22 14:42:04 +02:00 
						 
				 
			
				
					
						
							
							
								Ronald Cron 
							
						 
					 
					
						
						
							
						
						e68ab4f55e 
					 
					
						
						
							
							Introduce and use MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED  
						
						... 
						
						
						
						Introduce and use
MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED to
guard TLS code (both TLS 1.2 and 1.3) specific
to handshakes involving certificates.
Signed-off-by: Ronald Cron <ronald.cron@arm.com > 
						
						
					 
					
						2022-10-22 14:42:04 +02:00 
						 
				 
			
				
					
						
							
							
								Ronald Cron 
							
						 
					 
					
						
						
							
						
						41a443a68d 
					 
					
						
						
							
							tls13: Use MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK.*ENABLED  
						
						... 
						
						
						
						Use MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_PSK_ENABLED
instead of MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED to guard
code specific to one of the TLS 1.3 key exchange mode with
PSK.
Signed-off-by: Ronald Cron <ronald.cron@arm.com > 
						
						
					 
					
						2022-10-22 14:42:04 +02:00 
						 
				 
			
				
					
						
							
							
								Ronald Cron 
							
						 
					 
					
						
						
							
						
						928cbd34e7 
					 
					
						
						
							
							tls13: Use MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED  
						
						... 
						
						
						
						Use MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
instead of MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED to guard
code specific to the TLS 1.3 ephemeral key exchange mode.
Use it also for the dependencies of TLS 1.3 only tests
relying on ephemeral key exchange mode, but for
tests in tls13-kex-modes.sh where the change is done
later using all
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_.*ENABLED macros.
Signed-off-by: Ronald Cron <ronald.cron@arm.com > 
						
						
					 
					
						2022-10-22 14:42:04 +02:00 
						 
				 
			
				
					
						
							
							
								Ronald Cron 
							
						 
					 
					
						
						
							
						
						d29e13eb1b 
					 
					
						
						
							
							tls: Use the same function in TLS 1.2 and 1.3 to check PSK conf  
						
						... 
						
						
						
						Signed-off-by: Ronald Cron <ronald.cron@arm.com > 
						
						
					 
					
						2022-10-21 14:34:20 +02:00 
						 
				 
			
				
					
						
							
							
								Ronald Cron 
							
						 
					 
					
						
						
							
						
						2a87e9bf83 
					 
					
						
						
							
							tls: Align set and usage check for PSK  
						
						... 
						
						
						
						Check that the identity length is not
zero in ssl_conf_set_psk_identity()
as it is done in
mbedtls_ssl_conf_has_static_psk().
Signed-off-by: Ronald Cron <ronald.cron@arm.com > 
						
						
					 
					
						2022-10-21 14:34:20 +02:00 
						 
				 
			
				
					
						
							
							
								Andrzej Kurek 
							
						 
					 
					
						
						
							
						
						eabeb30c65 
					 
					
						
						
							
							Fix SHA512 vs SHA384 dependencies  
						
						... 
						
						
						
						When building SHA512 without SHA384,
there are some code paths that resulted
in unused variables or usage of undefined code.
This commit fixes that.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com > 
						
						
					 
					
						2022-10-19 08:35:09 -04:00 
						 
				 
			
				
					
						
							
							
								Andrzej Kurek 
							
						 
					 
					
						
						
							
						
						68327748d3 
					 
					
						
						
							
							Add missing dependencies  
						
						... 
						
						
						
						Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com > 
						
						
					 
					
						2022-10-19 08:35:08 -04:00 
						 
				 
			
				
					
						
							
							
								Andrzej Kurek 
							
						 
					 
					
						
						
							
						
						2d59dbc032 
					 
					
						
						
							
							Use TLS prf only if TLS 1.2 is compiled in  
						
						... 
						
						
						
						Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com > 
						
						
					 
					
						2022-10-19 08:35:08 -04:00 
						 
				 
			
				
					
						
							
							
								Andrzej Kurek 
							
						 
					 
					
						
						
							
						
						894edde991 
					 
					
						
						
							
							Add tls prf handling when there's no SHA256 or SHA384  
						
						... 
						
						
						
						Return a null prf function pointer and check for it when populating transform.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com > 
						
						
					 
					
						2022-10-19 08:35:08 -04:00 
						 
				 
			
				
					
						
							
							
								Ronald Cron 
							
						 
					 
					
						
						
							
						
						49e4184812 
					 
					
						
						
							
							Merge pull request  #6299  from xkqian/tls13_add_servername_check  
						
						... 
						
						
						
						Add server name check when proposing pre-share key 
						
						
					 
					
						2022-10-13 16:00:59 +02:00 
						 
				 
			
				
					
						
							
							
								Gilles Peskine 
							
						 
					 
					
						
						
							
						
						0fe6631486 
					 
					
						
						
							
							Merge pull request  #6291  from gilles-peskine-arm/platform.h-unconditional-3.2  
						
						... 
						
						
						
						Include platform.h unconditionally 
						
						
					 
					
						2022-10-13 10:19:22 +02:00 
						 
				 
			
				
					
						
							
							
								Xiaokang Qian 
							
						 
					 
					
						
						
							
						
						126bf8e4d7 
					 
					
						
						
							
							Address some comments  
						
						... 
						
						
						
						Delete reference immediately after shallow copy
Fix format issues
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com > 
						
						
					 
					
						2022-10-13 02:57:15 +00:00 
						 
				 
			
				
					
						
							
							
								Xiaokang Qian 
							
						 
					 
					
						
						
							
						
						997669aeeb 
					 
					
						
						
							
							Fix heap use-after-free corruption issue  
						
						... 
						
						
						
						Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com > 
						
						
					 
					
						2022-10-12 14:30:27 +00:00 
						 
				 
			
				
					
						
							
							
								Xiaokang Qian 
							
						 
					 
					
						
						
							
						
						baa4764d77 
					 
					
						
						
							
							Fix typo issues  
						
						... 
						
						
						
						Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com > 
						
						
					 
					
						2022-10-12 11:06:51 +00:00 
						 
				 
			
				
					
						
							
							
								Xiaokang Qian 
							
						 
					 
					
						
						
							
						
						8730644da1 
					 
					
						
						
							
							Move ticket and hostname set code just after shallow-copy  
						
						... 
						
						
						
						Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com > 
						
						
					 
					
						2022-10-12 11:06:51 +00:00