diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/resume.c | 5 | ||||
-rw-r--r-- | tests/tls13/anti_replay.c | 10 |
2 files changed, 1 insertions, 14 deletions
diff --git a/tests/resume.c b/tests/resume.c index 41cbebf8ea..0a3b20eac8 100644 --- a/tests/resume.c +++ b/tests/resume.c @@ -341,8 +341,6 @@ static void verify_alpn(gnutls_session_t session, struct params_res *params, uns static void verify_group(gnutls_session_t session, gnutls_group_t *group, unsigned counter) { - int ret; - if (counter == 0) { *group = gnutls_group_get(session); return; @@ -426,7 +424,6 @@ static void verify_server_params(gnutls_session_t session, unsigned counter, str } } - finish: return; } @@ -737,7 +734,7 @@ pskfunc(gnutls_session_t session, const char *username, static void server(int sds[], struct params_res *params) { - size_t t; + int t; int ret; gnutls_session_t session; char buffer[MAX_BUF + 1]; 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); } |