[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-236-g4774cbd
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-236-g4774cbd |
Date: |
Sat, 19 Jun 2010 09:27:05 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".
http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=4774cbdfdb94db66e5eb52e5195573622903a37e
The branch, master has been updated
via 4774cbdfdb94db66e5eb52e5195573622903a37e (commit)
via 438d976b176372b819fc3655d1353688ca16a947 (commit)
from fca326ff3f480bdcba1b12097336ed508446dc17 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4774cbdfdb94db66e5eb52e5195573622903a37e
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Sat Jun 19 11:20:40 2010 +0200
Allow setting debug level via cmd.
commit 438d976b176372b819fc3655d1353688ca16a947
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Sat Jun 19 11:19:51 2010 +0200
Explicitely terminate cryptodev sessions.
-----------------------------------------------------------------------
Summary of changes:
lib/cryptodev.c | 5 +++++
src/benchmark.c | 20 ++++++++++++++++----
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/lib/cryptodev.c b/lib/cryptodev.c
index 0ed9b57..3001a59 100644
--- a/lib/cryptodev.c
+++ b/lib/cryptodev.c
@@ -26,6 +26,7 @@
#include <gnutls_int.h>
#include <gnutls/crypto.h>
#include <gnutls_cryptodev.h>
+#include <gnutls_errors.h>
#ifdef ENABLE_CRYPTODEV
@@ -167,6 +168,7 @@ cryptodev_deinit (void *_ctx)
{
struct cryptodev_ctx *ctx = _ctx;
+ ioctl(ctx->cfd, CIOCFSESSION, &ctx->sess);
close (ctx->cfd);
gnutls_free (ctx);
}
@@ -218,6 +220,9 @@ register_crypto (int cfd)
continue;
}
+ ioctl(cfd, CIOCFSESSION, &sess);
+
+ _gnutls_debug_log("/dev/crypto: registering: %s\n",
gnutls_cipher_get_name(cipher_map[i].gnutls_cipher));
ret =
gnutls_crypto_single_cipher_register (cipher_map[i].gnutls_cipher, 90,
&cipher_struct);
diff --git a/src/benchmark.c b/src/benchmark.c
index cd2d9fc..e3be4c4 100644
--- a/src/benchmark.c
+++ b/src/benchmark.c
@@ -35,6 +35,12 @@ static unsigned char data[64 * 1024];
#define TOTAL_ITER 8*1024
static void
+tls_log_func (int level, const char *str)
+{
+ fprintf (stderr, "|<%d>| %s", level, str);
+}
+
+static void
cipher_bench (int algo, int size)
{
int ret, i;
@@ -64,7 +70,6 @@ cipher_bench (int algo, int size)
key.data = _key;
key.size = keysize;
- gnutls_global_init ();
printf ("Checking %s (%dkb payload)... ", gnutls_cipher_get_name (algo),
size);
@@ -117,8 +122,6 @@ mac_bench (int algo, int size)
return;
memset (_key, 0xf0, blocksize);
- gnutls_global_init ();
-
printf ("Checking %s (%dkb payload)... ", gnutls_mac_get_name (algo), size);
fflush (stdout);
gettime (&start);
@@ -143,8 +146,17 @@ mac_bench (int algo, int size)
}
int
-main (void)
+main (int argc, char** argv)
{
+ int debug_level = 0;
+
+ if (argc > 1)
+ debug_level = 2;
+
+ gnutls_global_set_log_function (tls_log_func);
+ gnutls_global_set_log_level (debug_level);
+ gnutls_global_init ();
+
mac_bench (GNUTLS_MAC_SHA1, 4);
mac_bench (GNUTLS_MAC_SHA1, 8);
mac_bench (GNUTLS_MAC_SHA1, 16);
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-236-g4774cbd,
Nikos Mavrogiannopoulos <=