X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=blobdiff_plain;f=src%2Flibstrongswan%2Ftypes.h;h=74f0cbf7ae6621caf6b6d2bd36d6026199623c3d;hp=ba59b225a694c36e1f07a6368efdcae1db5e778e;hb=299dbc604f48ed5a44029600b01d77477ecc1fd4;hpb=4df5f60bd3e043a9a0c2d7f261b09dca6d8f94e2 diff --git a/src/libstrongswan/types.h b/src/libstrongswan/types.h index ba59b22..74f0cbf 100644 --- a/src/libstrongswan/types.h +++ b/src/libstrongswan/types.h @@ -111,6 +111,18 @@ enum status_t { /** + * Certificate sending policy + */ +typedef enum certpolicy { + CERT_ALWAYS_SEND = 0, + CERT_SEND_IF_ASKED = 1, + CERT_NEVER_SEND = 2, + + CERT_YES_SEND = 3, /* synonym for CERT_ALWAYS_SEND */ + CERT_NO_SEND = 4 /* synonym for CERT_NEVER_SEND */ +} certpolicy_t; + +/** * String mappings for type status_t. */ extern mapping_t status_m[]; @@ -193,5 +205,18 @@ void chunk_to_hex(char *buf, size_t buflen, chunk_t chunk); */ void *clalloc(void *pointer, size_t size); +#define UNDEFINED_TIME 0 +#define TIMETOA_BUF 30 + +/** + * @brief Display a date either in local or UTC time + * + * @param buf buffer where displayed time will be written to + * @param buflen buffer length + * @param time time to be displayed + * @param utc UTC (TRUE) or local time (FALSE) + * + */ +void timetoa(char *buf, size_t buflen, const time_t *time, bool utc); #endif /*TYPES_H_*/