diff options
-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 bf3e5a7de1..5897cc2ace 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> @@ -301,12 +302,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]; |