summaryrefslogtreecommitdiff
path: root/src/benchmark-tls.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-06-06 16:13:13 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-06-06 16:24:56 +0200
commit9e6a23157d77ae28e693e805ac042921ba047b08 (patch)
treed3dc9f539ad37e592a77464ec2b4a7fcfcc9774f /src/benchmark-tls.c
parentebb8003e8aeab50e9245d895d17e17f17ce7c175 (diff)
downloadgnutls-9e6a23157d77ae28e693e805ac042921ba047b08.tar.gz
use the new API for receiving data
Diffstat (limited to 'src/benchmark-tls.c')
-rw-r--r--src/benchmark-tls.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/benchmark-tls.c b/src/benchmark-tls.c
index 161e02beb3..35a711c69a 100644
--- a/src/benchmark-tls.c
+++ b/src/benchmark-tls.c
@@ -181,6 +181,7 @@ static void test_ciphersuite(const char *cipher_prio, int size)
/* Need to enable anonymous KX specifically. */
int ret;
struct benchmark_st st;
+ gnutls_packet_st packet;
/* Init server */
gnutls_anon_allocate_server_credentials(&s_anoncred);
@@ -252,17 +253,17 @@ static void test_ciphersuite(const char *cipher_prio, int size)
do {
ret =
- gnutls_record_recv(server, buffer,
- sizeof(buffer));
+ gnutls_record_recv_packet(server, &packet);
}
while (ret == GNUTLS_E_AGAIN);
if (ret < 0) {
- fprintf(stderr, "Failed receiving from client\n");
+ fprintf(stderr, "Failed receiving from client: %s\n", gnutls_strerror(ret));
exit(1);
}
st.size += size;
+ gnutls_packet_deinit(&packet);
}
while (benchmark_must_finish == 0);