Jerry Yu
f52078f5a1
fix win32 ms time fail
...
`GetSystemTimeAsFileTime` returns 100 nano seconds elapsed time,
not 100 micro seconds.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-03-16 11:23:19 +08:00
Jerry Yu
02d684061b
Adjust time delay tests to fix fails
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-03-15 19:00:50 +08:00
Jerry Yu
205a741307
change the clock source to MONOTONIC
...
We need a non-settable source to avoid security issues.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-03-15 18:59:19 +08:00
Jerry Yu
e7ea823d43
remove extra spaces
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-03-14 17:33:42 +08:00
Jerry Yu
1f7dd8df9b
fix random fails
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-03-14 13:12:08 +08:00
Jerry Yu
c5b48a6f04
Add time test with delay
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-03-13 15:25:44 +08:00
Jerry Yu
3373ccaa18
Update changelog
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-03-13 11:39:43 +08:00
Jerry Yu
9a12df022e
Add tests for time rountine
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-03-03 15:31:28 +08:00
Jerry Yu
8049346989
Add change log entry for mbedtls_ms_time
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-03-03 11:19:07 +08:00
Jerry Yu
f181e54968
Revert minimal integer requests
...
Roll back to 64bits
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-23 17:16:26 +08:00
Jerry Yu
029e659bbb
Return seconds when clock_gettime error
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-23 11:25:36 +08:00
Jerry Yu
05bc87866e
Improve documents about ms_time
...
And fix typo error
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-23 11:20:45 +08:00
Jerry Yu
3bfe133832
Improve readability
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-22 15:01:05 +08:00
Jerry Yu
10ce540a8c
Put *MS_TIME* into together.
...
If MS_TIME_TYPE is changed, the printf fmt string should be changed also.
Otherwise, compiler might report fmt warning
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-21 15:39:02 +08:00
Jerry Yu
1ae2b2f034
Improve code style
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-21 15:37:12 +08:00
Jerry Yu
041c8c10f9
Add std PRI macro for printing milliseconds
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-07 16:14:40 +08:00
Jerry Yu
67bf677bad
fix comments issues
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-02-03 11:16:13 +08:00
Jerry Yu
eb30684d55
Change type of mbedtls_ms_time_t
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-01-31 12:59:26 +08:00
Jerry Yu
b1d3015e27
Add more comment for mbedtls_ms_time
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-01-31 12:48:07 +08:00
Jerry Yu
947fd3d6ea
Implement ms time with GetSystemTimeAsFile time.
...
There's a potential race condition with calling time(NULL) after
GetSystemTime().
See
https://learn.microsoft.com/en-us/archive/msdn-magazine/2004/march/implementing-a-high-resolution-time-provider-for-windows
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-01-30 15:45:25 +08:00
Jerry Yu
38257491aa
Add milliseconds time function
...
We provide windows and posix implementation for it.
With MBEDTLS_PLATFORM_MS_TIME_ALT, user can provide
their own implementation.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-01-12 18:01:14 +08:00
Jerry Yu
eba0ab5db2
Add million seconds time type.
...
From RFC8446, the unit of ticket age is million seconds
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-01-12 18:01:14 +08:00
Gilles Peskine
6b4cb63aed
Merge pull request #6907 from Mbed-TLS/features/new-code-style/development
...
Switch to new code style: development
2023-01-11 19:26:55 +01:00
Gilles Peskine
c848d226bf
Switch code style check to enforcement mode
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-01-11 14:50:14 +01:00
Gilles Peskine
449bd8303e
Switch to the new code style
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-01-11 14:50:10 +01:00
Gilles Peskine
fd13a0f851
Merge pull request #6905 from gilles-peskine-arm/code-style-casts-psa-headers-more
...
Remove redundant error code definitions
2023-01-11 14:40:42 +01:00
Gilles Peskine
c55c343670
Merge pull request #6884 from gilles-peskine-arm/check-files-unicode
...
Reject bad characters in source code
2023-01-11 13:46:59 +01:00
Gilles Peskine
03e99cf14d
Remove redundant error code definitions
...
We're including psa/crypto_values.h, which defines the necessary error
codes. Remove redundant definitions, which hurt because they need to be
styled in exactly the same way (same presence/absence of spaces between
tokens).
This completes the fix of https://github.com/Mbed-TLS/mbedtls/issues/6875 .
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-01-11 11:15:18 +01:00
Ronald Cron
83c5ad4873
Merge pull request #6787 from yuhaoth/pr/workaround-gnutls_anti_replay_fail
...
TLS 1.3: EarlyData: Workaround anti replay fail from GnuTLS
2023-01-11 09:05:36 +01:00
Gilles Peskine
3900bddd77
Merge pull request #6823 from mpg/unify-openssl-variables
...
Use OPENSSL everywhere, not OPENSSL_CMD
2023-01-10 22:10:19 +01:00
Gilles Peskine
f9c8d76db6
Merge pull request #6893 from tom-daubney-arm/modify_generate_errors_script
...
Make generate_errors.pl handle directory names containing spaces when opening files
2023-01-10 22:09:58 +01:00
Gilles Peskine
b4ffe781ed
Merge pull request #6878 from gilles-peskine-arm/code-style-casts-psa-headers
...
Don't restyle some PSA macros
2023-01-10 22:09:13 +01:00
Gilles Peskine
0770efe4e1
Merge pull request #6888 from daverodgman/iar-bignum-warning
...
Fix IAR warning
2023-01-10 22:08:37 +01:00
Dave Rodgman
bbbd803c2e
Add Changelog
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-01-10 10:08:12 +00:00
Thomas Daubney
1efe4a874d
Add ChangeLog entry
...
Add ChangeLog entry documenting bugfix.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-01-10 09:35:39 +00:00
Manuel Pégourié-Gonnard
28d4d43416
Merge pull request #6863 from valeriosetti/issue6830
...
Remove uses of mbedtls_ecp_curve_info in TLS (with USE_PSA)
2023-01-10 10:01:17 +01:00
Manuel Pégourié-Gonnard
6e666c2e79
Remove obsolete comment
...
Was explaining why we didn't use the OPENSSL name, but we are using it
now...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-01-10 09:38:58 +01:00
Manuel Pégourié-Gonnard
3368724ade
Merge pull request #6870 from valeriosetti/issue6831
...
Document/test dependencies on ECP & Bignum
2023-01-10 09:25:41 +01:00
Jerry Yu
3e60cada5d
Improve comment and changlog
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-01-10 14:58:08 +08:00
Thomas Daubney
33878ed30b
Modify generate errors script
...
Modify generate_errors.pl such that it can now handle
opening files where the file path includes a directory
name containing spaces.
Raised in issue #6879 . Fix provided by
@tom-cosgrove-arm in aforementioned issue.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2023-01-09 18:28:10 +00:00
Valerio Setti
a0b97bc803
fix wrong type in debug message
...
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2023-01-09 19:10:32 +01:00
Valerio Setti
2c12185b88
test: fix dependencies on function and data files
...
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2023-01-09 18:00:39 +01:00
Valerio Setti
1e868ccbac
fix several typos and extra blank spaces
...
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2023-01-09 17:59:46 +01:00
Valerio Setti
2b5d3ded1f
remove remaining occurencies of mbedtls_ecc_group_to_psa() from TLS
...
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2023-01-09 11:04:52 +01:00
Jerry Yu
99e902f479
Add changlog entry.
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-01-07 20:20:35 +08:00
Jerry Yu
bdb936b7a5
Workaround anti replay fail of GnuTLS
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-01-07 20:19:55 +08:00
Jerry Yu
a15af37867
Change time resolution of reco_delay from second to millionseconds
...
Per gnutls anti replay issue, it needs millionsecond time delay for
improve the fail rate.
From test result of #6712 , this can improve the fail rate from 4%
to 92%.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-01-07 13:01:42 +08:00
Jerry Yu
f05b6eed0c
Revert "Skip early data basic check temp"
...
This reverts commit 4e83173bb7b6770d99022d79ac2d3624c80b8c37.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-01-07 13:01:42 +08:00
Glenn Strauss
14db51224e
Fix IAR warning
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-01-06 14:20:14 +00:00
Manuel Pégourié-Gonnard
b17803682e
Merge pull request #6873 from mpg/fix-derive-key-exercise
...
Fix test function derive_key_exercise()
2023-01-06 11:50:05 +01:00