]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
gnutls-cli's benchmark-soft-ciphers is no more.
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 27 May 2014 14:36:58 +0000 (16:36 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 27 May 2014 14:36:58 +0000 (16:36 +0200)
It could not be emulated with the new library.

src/benchmark-cipher.c
src/benchmark.h
src/cli-args.def
src/cli.c

index 6f4983bb8bc8c8dd3aae137989f7d5ca2b63ae3d..0886dbb4947e34cdaaa1d68da068bbb105d23598 100644 (file)
@@ -191,16 +191,13 @@ static void mac_bench(int algo, int size)
        free(_key);
 }
 
-void benchmark_cipher(int init, int debug_level)
+void benchmark_cipher(int debug_level)
 {
+       int size = 16;
        gnutls_global_set_log_function(tls_log_func);
        gnutls_global_set_log_level(debug_level);
-       int size = 16;
 
-       if (init) {
-               gnutls_global_init();
-               gnutls_rnd(GNUTLS_RND_NONCE, data, sizeof(data));
-       }
+       gnutls_rnd(GNUTLS_RND_NONCE, data, sizeof(data));
 
        printf("Checking ciphers, payload size: %u\n", size * 1024);
        cipher_mac_bench(GNUTLS_CIPHER_SALSA20_256, GNUTLS_MAC_SHA1, size);
index cadd0d26155dbfa22f99fa7c767d0d35db9f0e1a..b71b913e5b622317202987788523dbf054b1d14b 100644 (file)
@@ -39,7 +39,7 @@ inline static void gettime(struct timespec *ts)
 
 typedef void (*sighandler_t) (int);
 
-void benchmark_cipher(int init, int debug_level);
+void benchmark_cipher(int debug_level);
 void benchmark_tls(int debug_level, int ciphers);
 
 struct benchmark_st {
index ddca613e2258836362397892c89e702358c76413..facc22ca1eb09240bf4670e0870a64a38b145526 100644 (file)
@@ -261,12 +261,6 @@ flag = {
     doc      = "";
 };
 
-flag = {
-    name      = benchmark-soft-ciphers;
-    descrip   = "Benchmark individual software ciphers (no hw acceleration)";
-    doc      = "";
-};
-
 flag = {
     name      = benchmark-tls-kx;
     descrip   = "Benchmark TLS key exchange methods";
index ddf9a832ca7ab22d4dcc541df91a1be43c0d99c8..4cc858b3929f29be6365c8f546837b976c6c90d7 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -1346,12 +1346,7 @@ static void cmd_parser(int argc, char **argv)
                rest = argv[0];
 
        if (HAVE_OPT(BENCHMARK_CIPHERS)) {
-               benchmark_cipher(1, OPT_VALUE_DEBUG);
-               exit(0);
-       }
-
-       if (HAVE_OPT(BENCHMARK_SOFT_CIPHERS)) {
-               benchmark_cipher(0, OPT_VALUE_DEBUG);
+               benchmark_cipher(OPT_VALUE_DEBUG);
                exit(0);
        }