From f3219c512bee5783a1d6ff097ab920748859f98a Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 27 May 2014 21:29:44 +0000 Subject: Fix a Y2038 problem, by conversion of long to time_t. The TS_RESP_CTX_set_time_cb() API gets removed. Nothing in the greater ecosystem ever calls it. This API needs to be removed, because if anyone ever calls on a BE 32 system assuming long rather than time_t, it will be dangerously incompatible. ok miod guenther --- lib/libcrypto/ts/ts.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/libcrypto/ts/ts.h') diff --git a/lib/libcrypto/ts/ts.h b/lib/libcrypto/ts/ts.h index 085e062b96c..eb160b0e4dd 100644 --- a/lib/libcrypto/ts/ts.h +++ b/lib/libcrypto/ts/ts.h @@ -473,7 +473,7 @@ typedef ASN1_INTEGER *(*TS_serial_cb)(struct TS_resp_ctx *, void *); /* This must return the seconds and microseconds since Jan 1, 1970 in the sec and usec variables allocated by the caller. Return non-zero for success and zero for failure. */ -typedef int (*TS_time_cb)(struct TS_resp_ctx *, void *, long *sec, long *usec); +typedef int (*TS_time_cb)(struct TS_resp_ctx *, void *, time_t *sec, long *usec); /* This must process the given extension. * It can modify the TS_TST_INFO object of the context. @@ -556,9 +556,6 @@ void TS_RESP_CTX_add_flags(TS_RESP_CTX *ctx, int flags); /* Default callback always returns a constant. */ void TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data); -/* Default callback uses the gettimeofday() and gmtime() system calls. */ -void TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data); - /* Default callback rejects all extensions. The extension callback is called * when the TS_TST_INFO object is already set up and not signed yet. */ /* FIXME: extension handling is not tested yet. */ -- cgit v1.2.3