* plays with the local clock.
*/
typedef struct fr_time_s {
- int64_t value;
+ int64_t value; //!< Signed because we need times before the server started
+ ///< for things like certificate validity checks and cache
+ ///< entries.
} fr_time_t;
/** "Unix" time. This is the time in nanoseconds since midnight January 1, 1970
*/
typedef int64_t fr_time_delta_t;
+#define fr_time_max() (fr_time_t){ .value = INT64_MAX }
#define fr_time_wrap(_time) (fr_time_t){ .value = (_time) }
#define fr_time_unwrap(_time) (_time).value
if (vp->da == attr_eap_fast_pac_acknowledge) {
if (vp->vp_uint32 == EAP_FAST_TLV_RESULT_SUCCESS) {
code = FR_RADIUS_CODE_ACCESS_ACCEPT;
- t->pac.expires = fr_time_wrap(~fr_time_unwrap(fr_time_wrap(0)));
+ t->pac.expires = fr_time_max();
t->pac.expired = false;
t->stage = EAP_FAST_COMPLETE;
}