diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-03-08 12:03:39 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-03-08 12:04:33 +0100 |
commit | d0cabda67d4adaf92f25898a9211b954b28e5d25 (patch) | |
tree | 747d2dcaa569013e4fc73e1249e0896974fcac87 | |
parent | 953cb6462d58470903eb0a0038091514dcd360f9 (diff) | |
download | gnutls-d0cabda67d4adaf92f25898a9211b954b28e5d25.tar.gz |
cryptodev: fix prototype of cryptodev_mac_fast [ci skip]
Resolves #406
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | lib/accelerated/cryptodev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/accelerated/cryptodev.c b/lib/accelerated/cryptodev.c index 9d04171be4..7794dbd6b8 100644 --- a/lib/accelerated/cryptodev.c +++ b/lib/accelerated/cryptodev.c @@ -28,6 +28,7 @@ #ifdef ENABLE_CRYPTODEV +#include <assert.h> #include <fcntl.h> #include <sys/ioctl.h> #include <crypto/cryptodev.h> @@ -298,12 +299,15 @@ static const int gnutls_mac_map[] = { static int cryptodev_mac_fast(gnutls_mac_algorithm_t algo, + const void *nonce, size_t nonce_size, const void *key, size_t key_size, const void *text, size_t text_size, void *digest) { struct cryptodev_ctx ctx; int ret; + assert(nonce_size == 0); + memset(&ctx, 0, sizeof(ctx)); ctx.cfd = _gnutls_cryptodev_fd; ctx.sess.mac = gnutls_mac_map[algo]; |