[SCM] GNU gnutls branch, master, updated. gnutls_3_0_13-7-g11b8f09

"Nikos Mavrogiannopoulos" <[email protected]>
Newsgroups gmane.comp.encryption.gpg.gnutls.cvs
Message-ID <[email protected]>
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=11b8f099bf0545fe6f1613fc37eb18f37eebd9da

The branch, master has been updated
       via  11b8f099bf0545fe6f1613fc37eb18f37eebd9da (commit)
      from  11722af465b4e8999d16630067b17ddc64f819ec (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 11b8f099bf0545fe6f1613fc37eb18f37eebd9da
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Sun Feb 19 12:27:30 2012 +0100

    update in cryptodev

-----------------------------------------------------------------------

Summary of changes:
 lib/accelerated/cryptodev.c |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/lib/accelerated/cryptodev.c b/lib/accelerated/cryptodev.c
index 7a34c0c..84471c5 100644
--- a/lib/accelerated/cryptodev.c
+++ b/lib/accelerated/cryptodev.c
@@ -64,7 +64,7 @@ static const int gnutls_cipher_map[] = {
 };
 
 static int
-cryptodev_cipher_init (gnutls_cipher_algorithm_t algorithm, void **_ctx)
+cryptodev_cipher_init (gnutls_cipher_algorithm_t algorithm, void **_ctx, int enc)
 {
   struct cryptodev_ctx *ctx;
   int cipher = gnutls_cipher_map[algorithm];
@@ -172,8 +172,9 @@ static int
 register_crypto (int cfd)
 {
   struct session_op sess;
-  char fake_key[CRYPTO_CIPHER_MAX_KEY_LEN];
-  int i = 0, ret;
+  uint8_t fake_key[CRYPTO_CIPHER_MAX_KEY_LEN];
+  unsigned int i;
+  int ret;
 
   memset (&sess, 0, sizeof (sess));
 
@@ -365,13 +366,13 @@ cryptodev_mac_fast (gnutls_mac_algorithm_t algo,
                         const void *key, size_t key_size, const void *text,
                         size_t text_size, void *digest)
 {
-int mac = gnutls_mac_map[algorithm];
+int mac = gnutls_mac_map[algo];
 struct session_op sess; 
 struct crypt_op cryp;
 
   sess.mac = mac;
-  sess.mackey = key;
-  sess.mackeylen = keysize;
+  sess.mackey = (void*)key;
+  sess.mackeylen = key_size;
 
   if (ioctl (cryptodev_fd, CIOCGSESSION, &sess))
     {
@@ -401,7 +402,7 @@ static const gnutls_crypto_mac_st mac_struct = {
   .setkey = cryptodev_mac_setkey,
   .hash = cryptodev_mac_hash,
   .output = cryptodev_mac_output,
-  .deinit = cryptodev_mac_deinit
+  .deinit = cryptodev_mac_deinit,
   .fast = cryptodev_mac_fast
 };
 
@@ -409,8 +410,9 @@ static int
 register_mac (int cfd)
 {
   struct session_op sess;
-  char fake_key[CRYPTO_CIPHER_MAX_KEY_LEN];
-  int i = 0, ret;
+  uint8_t fake_key[CRYPTO_CIPHER_MAX_KEY_LEN];
+  unsigned int i;
+  int ret;
 
   memset (&sess, 0, sizeof (sess));
   for (i = 0; i < sizeof (gnutls_mac_map) / sizeof (gnutls_mac_map[0]); i++)


hooks/post-receive
-- 
GNU gnutls
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.