summaryrefslogtreecommitdiff
path: root/lib/handshake.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/handshake.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/handshake.h')
-rw-r--r--lib/handshake.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/handshake.h b/lib/handshake.h
index 38ef848784..ee5ee7a437 100644
--- a/lib/handshake.h
+++ b/lib/handshake.h
@@ -116,7 +116,7 @@ inline static int handshake_remaining_time(gnutls_session_t session)
{
if (session->internals.handshake_endtime) {
struct timespec now;
- gettime(&now);
+ gnutls_gettime(&now);
if (now.tv_sec < session->internals.handshake_endtime)
return (session->internals.handshake_endtime -