Skip to content

Use mbedtls_time_t instead of time_t #10236

@irwir

Description

@irwir

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.

Metadata

Metadata

Assignees

Labels

size-xsEstimated task size: extra small (a few hours at most)

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions