* add the accessor
* bump libtr_tid ABI version
libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
libtr_tid_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
libtr_tid_la_LIBADD = gsscon/libgsscon.la $(GLIB_LIBS)
-libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 3:0:1 -no-undefined
+libtr_tid_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:0:2 -no-undefined
common_t_constraint_SOURCES = common/t_constraint.c \
common/tr_debug.c \
common_t_constraint_SOURCES = common/t_constraint.c \
common/tr_debug.c \
TR_EXPORT DH *tid_srvr_get_dh(TID_SRVR_BLK *);
TR_EXPORT const TR_NAME *tid_srvr_get_key_name(const TID_SRVR_BLK *);
TR_EXPORT const TID_PATH *tid_srvr_get_path(const TID_SRVR_BLK *);
TR_EXPORT DH *tid_srvr_get_dh(TID_SRVR_BLK *);
TR_EXPORT const TR_NAME *tid_srvr_get_key_name(const TID_SRVR_BLK *);
TR_EXPORT const TID_PATH *tid_srvr_get_path(const TID_SRVR_BLK *);
+/* Key expiration time is expressed as time since 1970-01-01 00:00:00 UTC */
+TR_EXPORT int tid_srvr_get_key_expiration(const TID_SRVR_BLK *, struct timeval *tv_out);
#define tid_resp_servers_foreach(RESP, SERVER, INDEX) \
for (INDEX=0,SERVER=NULL; \
#define tid_resp_servers_foreach(RESP, SERVER, INDEX) \
for (INDEX=0,SERVER=NULL; \
+TR_EXPORT int tid_srvr_get_key_expiration(const TID_SRVR_BLK *block, struct timeval *tv_out)
+{
+ if ((block==NULL) || (tv_out==NULL))
+ return -1; /* error */
+
+ tv_out->tv_sec=block->key_expiration.tv_sec;
+ tv_out->tv_usec=block->key_expiration.tv_usec;
+ return 0;
+}
+
+
TR_EXPORT void tid_resp_set_cons(TID_RESP *resp, TR_CONSTRAINT_SET *cons)
{
json_t *jc=(json_t *)cons;
TR_EXPORT void tid_resp_set_cons(TID_RESP *resp, TR_CONSTRAINT_SET *cons)
{
json_t *jc=(json_t *)cons;