Suggested enhancement
The library defines mbedtls_time_t type in platform_time.h.
Currently, Github finds 3 cases where time_t was used directly.
Must have been mbedtls_time_t
|
session->start = (time_t) start; |
Redefinition.
|
#define mbedtls_time_t time_t |
This one is questionable, but may use mbedtls_time_t
This one needs no changes, because the function is declared as
struct tm *gmtime(const time_t *timep);
|
struct tm *t = gmtime((time_t *) time); |
Justification
For platform independence, the type mbedtls_time_t was expected to be used everywhere in the library and example programs.
Therefore, platform_time.h should be preferable to time.h.
Suggested enhancement
The library defines
mbedtls_time_ttype in platform_time.h.Currently, Github finds 3 cases where
time_twas used directly.Must have been
mbedtls_time_tmbedtls/library/ssl_tls.c
Line 3278 in 4ccde0c
Redefinition.
mbedtls/programs/test/udp_proxy.c
Line 27 in 4ccde0c
This one is questionable, but may usembedtls_time_tThis one needs no changes, because the function is declared as
struct tm *gmtime(const time_t *timep);mbedtls/programs/ssl/ssl_context_info.c
Line 280 in 4ccde0c
Justification
For platform independence, the type
mbedtls_time_twas expected to be used everywhere in the library and example programs.Therefore, platform_time.h should be preferable to time.h.