summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/ts/ts.h7
-rw-r--r--src/lib/libcrypto/ts/ts_rsp_sign.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ts/ts.h b/src/lib/libcrypto/ts/ts.h
index 83bd6829ae..0397fb8b08 100644
--- a/src/lib/libcrypto/ts/ts.h
+++ b/src/lib/libcrypto/ts/ts.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts.h,v 1.17 2022/07/24 19:54:46 tb Exp $ */ 1/* $OpenBSD: ts.h,v 1.18 2022/07/24 20:02:04 tb Exp $ */
2/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL
3 * project 2002, 2003, 2004. 3 * project 2002, 2003, 2004.
4 */ 4 */
@@ -567,6 +567,11 @@ void TS_RESP_CTX_add_flags(TS_RESP_CTX *ctx, int flags);
567/* Default callback always returns a constant. */ 567/* Default callback always returns a constant. */
568void TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data); 568void TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data);
569 569
570#if defined(LIBRESSL_INTERNAL)
571/* Default callback uses gettimeofday() and gmtime(). */
572void TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data);
573#endif
574
570/* Default callback rejects all extensions. The extension callback is called 575/* Default callback rejects all extensions. The extension callback is called
571 * when the TS_TST_INFO object is already set up and not signed yet. */ 576 * when the TS_TST_INFO object is already set up and not signed yet. */
572/* FIXME: extension handling is not tested yet. */ 577/* FIXME: extension handling is not tested yet. */
diff --git a/src/lib/libcrypto/ts/ts_rsp_sign.c b/src/lib/libcrypto/ts/ts_rsp_sign.c
index 665dc1cec4..5e152954bf 100644
--- a/src/lib/libcrypto/ts/ts_rsp_sign.c
+++ b/src/lib/libcrypto/ts/ts_rsp_sign.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_rsp_sign.c,v 1.28 2022/07/24 08:16:47 tb Exp $ */ 1/* $OpenBSD: ts_rsp_sign.c,v 1.29 2022/07/24 20:02:04 tb Exp $ */
2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
3 * project 2002. 3 * project 2002.
4 */ 4 */
@@ -143,6 +143,13 @@ def_extension_cb(struct TS_resp_ctx *ctx, X509_EXTENSION *ext, void *data)
143 return 0; 143 return 0;
144} 144}
145 145
146void
147TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data)
148{
149 ctx->time_cb = cb;
150 ctx->time_cb_data = data;
151}
152
146/* TS_RESP_CTX management functions. */ 153/* TS_RESP_CTX management functions. */
147 154
148TS_RESP_CTX * 155TS_RESP_CTX *