BOLOS TEE
Functions
bolos_time.h File Reference

Secure time API used to provide a trusted time reference. More...

Go to the source code of this file.

Functions

int bls_time_supported (void)
 Check if time hardware APIs are supported on this platform. More...
 
int bls_time_delta (uint8_t *referenceOut, size_t referenceOutLength, uint64_t *delta, uint8_t *trusted)
 Return the time difference in seconds between two calls. More...
 
int bls_time (uint64_t *time, uint8_t *trusted)
 Return the time as the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). More...
 

Detailed Description

Secure time API used to provide a trusted time reference.

Author
Ledger Firmware Team hello.nosp@m.@led.nosp@m.ger.f.nosp@m.r
Version
1.0
Date
4th of December 2016

The time API provides access to a hardware based secure time source.

Support of this API is platform dependent

Function Documentation

int bls_time ( uint64_t *  time,
uint8_t *  trusted 
)

Return the time as the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

Parameters
[out]timeUnix time
[out]trustedSet to 1 if the time delta is trusted, or 0
Returns
1 if success, 0 if error
int bls_time_delta ( uint8_t *  referenceOut,
size_t  referenceOutLength,
uint64_t *  delta,
uint8_t *  trusted 
)

Return the time difference in seconds between two calls.

Parameters
[in,out]referenceOutBuffer to contain the time reference or containing the first time reference
[in]referenceOutLengthSize of the buffer to contain the time reference
[out]deltaTime difference in seconds between two calls for the same reference
[out]trustedSet to 1 if the time delta is trusted, or 0
Returns
size of the time reference if success, 0 if error
int bls_time_supported ( void  )

Check if time hardware APIs are supported on this platform.

Returns
1 if supported, 0 if not supported