summaryrefslogtreecommitdiff
path: root/tests/tls13/anti_replay.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tls13/anti_replay.c')
-rw-r--r--tests/tls13/anti_replay.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/tls13/anti_replay.c b/tests/tls13/anti_replay.c
index 31ab517151..d8636f0b43 100644
--- a/tests/tls13/anti_replay.c
+++ b/tests/tls13/anti_replay.c
@@ -84,7 +84,6 @@ void doit(void)
gnutls_datum_t key = { (unsigned char *) "\xFF\xFF\xFF\xFF", 4 };
struct timespec creation_time;
struct storage_st storage;
- gnutls_session_t session;
int ret;
virt_time_init();
@@ -96,13 +95,10 @@ void doit(void)
gnutls_anti_replay_set_window(anti_replay, 10000);
gnutls_anti_replay_set_add_function(anti_replay, storage_add);
gnutls_anti_replay_set_ptr(anti_replay, &storage);
- gnutls_init(&session, GNUTLS_SERVER);
- gnutls_anti_replay_enable(session, anti_replay);
mygettime(&creation_time);
ret = _gnutls_anti_replay_check(anti_replay, 10000, &creation_time, &key);
if (ret != GNUTLS_E_ILLEGAL_PARAMETER)
fail("error is not returned, while server_ticket_age < client_ticket_age\n");
- gnutls_deinit(session);
gnutls_anti_replay_deinit(anti_replay);
storage_clear(&storage);
@@ -112,14 +108,11 @@ void doit(void)
gnutls_anti_replay_set_add_function(anti_replay, storage_add);
gnutls_anti_replay_set_ptr(anti_replay, &storage);
gnutls_anti_replay_set_window(anti_replay, 10000);
- gnutls_init(&session, GNUTLS_SERVER);
- gnutls_anti_replay_enable(session, anti_replay);
mygettime(&creation_time);
virt_sec_sleep(30);
ret = _gnutls_anti_replay_check(anti_replay, 10000, &creation_time, &key);
if (ret != GNUTLS_E_EARLY_DATA_REJECTED)
fail("early data is NOT rejected, while freshness check fails\n");
- gnutls_deinit(session);
gnutls_anti_replay_deinit(anti_replay);
storage_clear(&storage);
@@ -129,8 +122,6 @@ void doit(void)
gnutls_anti_replay_set_add_function(anti_replay, storage_add);
gnutls_anti_replay_set_ptr(anti_replay, &storage);
gnutls_anti_replay_set_window(anti_replay, 10000);
- gnutls_init(&session, GNUTLS_SERVER);
- gnutls_anti_replay_enable(session, anti_replay);
mygettime(&creation_time);
virt_sec_sleep(15);
ret = _gnutls_anti_replay_check(anti_replay, 10000, &creation_time, &key);
@@ -139,7 +130,6 @@ void doit(void)
ret = _gnutls_anti_replay_check(anti_replay, 10000, &creation_time, &key);
if (ret != GNUTLS_E_EARLY_DATA_REJECTED)
fail("early data is NOT rejected for a duplicate key\n");
- gnutls_deinit(session);
gnutls_anti_replay_deinit(anti_replay);
storage_clear(&storage);
}