diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-06-06 21:11:48 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-06-06 21:11:48 +0200 |
commit | 022431ce6c2f05acdfc5c1030a3b51b75edd5074 (patch) | |
tree | 5363584d5f174284afe3c8adc9a515f4554eb8be /src/benchmark-tls.c | |
parent | ac25cc3d1568d3409db14e09ca3c684e787401eb (diff) | |
download | gnutls-022431ce6c2f05acdfc5c1030a3b51b75edd5074.tar.gz |
Options --benchmark-tls was split to --benchmark-tls-kx
Diffstat (limited to 'src/benchmark-tls.c')
-rw-r--r-- | src/benchmark-tls.c | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/src/benchmark-tls.c b/src/benchmark-tls.c index 2693bdb097..b941c5cd68 100644 --- a/src/benchmark-tls.c +++ b/src/benchmark-tls.c @@ -356,39 +356,44 @@ static void test_ciphersuite_kx(const char *cipher_prio) } -void benchmark_tls(int debug_level) +void benchmark_tls(int debug_level, int ciphers) { gnutls_global_set_log_function(tls_log_func); gnutls_global_set_log_level(debug_level); gnutls_global_init(); - printf("Testing throughput in cipher/MAC combinations:\n"); - - test_ciphersuite(PRIO_ARCFOUR_128_MD5, 1024); - test_ciphersuite(PRIO_ARCFOUR_128_MD5, 4096); - test_ciphersuite(PRIO_ARCFOUR_128_MD5, 8 * 1024); - test_ciphersuite(PRIO_ARCFOUR_128_MD5, 15 * 1024); - - test_ciphersuite(PRIO_AES_GCM, 1024); - test_ciphersuite(PRIO_AES_GCM, 4096); - test_ciphersuite(PRIO_AES_GCM, 8 * 1024); - test_ciphersuite(PRIO_AES_GCM, 15 * 1024); - - test_ciphersuite(PRIO_AES_CBC_SHA1, 1024); - test_ciphersuite(PRIO_AES_CBC_SHA1, 4096); - test_ciphersuite(PRIO_AES_CBC_SHA1, 8 * 1024); - test_ciphersuite(PRIO_AES_CBC_SHA1, 15 * 1024); - - test_ciphersuite(PRIO_CAMELLIA_CBC_SHA1, 1024); - test_ciphersuite(PRIO_CAMELLIA_CBC_SHA1, 4096); - test_ciphersuite(PRIO_CAMELLIA_CBC_SHA1, 8 * 1024); - test_ciphersuite(PRIO_CAMELLIA_CBC_SHA1, 15 * 1024); - - printf("\nTesting key exchanges (RSA/DH bits: %d, EC bits: %d):\n", rsa_bits, ec_bits); - test_ciphersuite_kx(PRIO_DH); - test_ciphersuite_kx(PRIO_ECDH); - test_ciphersuite_kx(PRIO_ECDHE_ECDSA); - test_ciphersuite_kx(PRIO_RSA); + if (ciphers != 0) + { + printf("Testing throughput in cipher/MAC combinations:\n"); + + test_ciphersuite(PRIO_ARCFOUR_128_MD5, 1024); + test_ciphersuite(PRIO_ARCFOUR_128_MD5, 4096); + test_ciphersuite(PRIO_ARCFOUR_128_MD5, 8 * 1024); + test_ciphersuite(PRIO_ARCFOUR_128_MD5, 15 * 1024); + + test_ciphersuite(PRIO_AES_GCM, 1024); + test_ciphersuite(PRIO_AES_GCM, 4096); + test_ciphersuite(PRIO_AES_GCM, 8 * 1024); + test_ciphersuite(PRIO_AES_GCM, 15 * 1024); + + test_ciphersuite(PRIO_AES_CBC_SHA1, 1024); + test_ciphersuite(PRIO_AES_CBC_SHA1, 4096); + test_ciphersuite(PRIO_AES_CBC_SHA1, 8 * 1024); + test_ciphersuite(PRIO_AES_CBC_SHA1, 15 * 1024); + + test_ciphersuite(PRIO_CAMELLIA_CBC_SHA1, 1024); + test_ciphersuite(PRIO_CAMELLIA_CBC_SHA1, 4096); + test_ciphersuite(PRIO_CAMELLIA_CBC_SHA1, 8 * 1024); + test_ciphersuite(PRIO_CAMELLIA_CBC_SHA1, 15 * 1024); + } + else + { + printf("\nTesting key exchanges (RSA/DH bits: %d, EC bits: %d):\n", rsa_bits, ec_bits); + test_ciphersuite_kx(PRIO_DH); + test_ciphersuite_kx(PRIO_ECDH); + test_ciphersuite_kx(PRIO_ECDHE_ECDSA); + test_ciphersuite_kx(PRIO_RSA); + } gnutls_global_deinit(); |