-/* $OpenBSD: ts.h,v 1.17 2022/07/24 19:54:46 tb Exp $ */
+/* $OpenBSD: ts.h,v 1.18 2022/07/24 20:02:04 tb Exp $ */
/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL
* project 2002, 2003, 2004.
*/
/* Default callback always returns a constant. */
void TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data);
+#if defined(LIBRESSL_INTERNAL)
+/* Default callback uses gettimeofday() and gmtime(). */
+void TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data);
+#endif
+
/* 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. */
-/* $OpenBSD: ts_rsp_sign.c,v 1.28 2022/07/24 08:16:47 tb Exp $ */
+/* $OpenBSD: ts_rsp_sign.c,v 1.29 2022/07/24 20:02:04 tb Exp $ */
/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
* project 2002.
*/
return 0;
}
+void
+TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data)
+{
+ ctx->time_cb = cb;
+ ctx->time_cb_data = data;
+}
+
/* TS_RESP_CTX management functions. */
TS_RESP_CTX *