mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
rp2/mbedtls: Enable certificate validity time validation.
This commit is contained in:
committed by
Damien George
parent
10f85fee18
commit
b560b9fe71
@@ -29,6 +29,9 @@
|
||||
|
||||
#include "mbedtls_config.h"
|
||||
|
||||
#include "hardware/rtc.h"
|
||||
#include "shared/timeutils/timeutils.h"
|
||||
|
||||
extern uint8_t rosc_random_u8(size_t cycles);
|
||||
|
||||
int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t *olen) {
|
||||
@@ -39,4 +42,10 @@ int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t
|
||||
return 0;
|
||||
}
|
||||
|
||||
time_t rp2_rtctime_seconds(time_t *timer) {
|
||||
datetime_t t;
|
||||
rtc_get_datetime(&t);
|
||||
return timeutils_seconds_since_epoch(t.year, t.month, t.day, t.hour, t.min, t.sec);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user