summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-07-17 17:51:52 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-07-17 17:51:52 +0200
commit0287f236d45ae6f0a77e2ac96362242dad22c3b9 (patch)
tree94e1b9048f0ea69cea57b8d37c99ea33cfe24960 /src
parent4c3db964f976389c0545abb32f1e64ab2f61b037 (diff)
downloadgnutls-0287f236d45ae6f0a77e2ac96362242dad22c3b9.tar.gz
Client credentials initialization moved outside benchmark
Diffstat (limited to 'src')
-rw-r--r--src/benchmark-tls.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/benchmark-tls.c b/src/benchmark-tls.c
index b941c5cd68..b133671e14 100644
--- a/src/benchmark-tls.c
+++ b/src/benchmark-tls.c
@@ -298,6 +298,10 @@ static void test_ciphersuite_kx(const char *cipher_prio)
gnutls_certificate_set_x509_key_mem (s_certcred, &server_ecc_cert, &server_ecc_key,
GNUTLS_X509_FMT_PEM);
+ /* Init client */
+ gnutls_anon_allocate_client_credentials(&c_anoncred);
+ gnutls_certificate_allocate_credentials(&c_certcred);
+
start_benchmark(&st);
do {
@@ -314,10 +318,6 @@ static void test_ciphersuite_kx(const char *cipher_prio)
gnutls_transport_set_ptr(server, (gnutls_transport_ptr_t) server);
reset_buffers();
- /* Init client */
- gnutls_anon_allocate_client_credentials(&c_anoncred);
- gnutls_certificate_allocate_credentials(&c_certcred);
-
gnutls_init(&client, GNUTLS_CLIENT);
ret = gnutls_priority_set_direct(client, cipher_prio, &str);