summaryrefslogtreecommitdiff
path: root/lib/dtls.h
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2018-10-25 13:47:13 +0200
committerDaiki Ueno <dueno@redhat.com>2018-10-26 08:23:05 +0200
commita248c0ec45f0ce6ffe349d0fc865fd536033f73f (patch)
tree71029ec915f7a0cbde25ba2d779c01de93d4fab2 /lib/dtls.h
parent0ec886fab57ce96394b98f794ed2a96ae9782f6e (diff)
downloadgnutls-a248c0ec45f0ce6ffe349d0fc865fd536033f73f.tar.gz
system: provide a means to replace gettime implementation
While gettime() is extensively used in the code, the library previously hadn't provided a way to replace it for testing. This adds a new internal function _gnutls_global_set_gettime_function and makes use of it through virt-time.h. Signed-off-by: Daiki Ueno <dueno@redhat.com>
Diffstat (limited to 'lib/dtls.h')
-rw-r--r--lib/dtls.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtls.h b/lib/dtls.h
index c7e72cf9b7..717d3bdc6d 100644
--- a/lib/dtls.h
+++ b/lib/dtls.h
@@ -40,7 +40,7 @@ void _dtls_reset_window(struct record_parameters_st *rp);
#define RETURN_DTLS_EAGAIN_OR_TIMEOUT(session, r) { \
struct timespec _now; \
unsigned int _diff; \
- gettime(&_now); \
+ gnutls_gettime(&_now); \
\
_diff = timespec_sub_ms(&_now, &session->internals.handshake_start_time); \
if (_diff > session->internals.handshake_timeout_ms) \