]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
cryptodev: fix prototype of cryptodev_mac_fast [ci skip]
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 8 Mar 2018 11:03:39 +0000 (12:03 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 8 Mar 2018 11:03:49 +0000 (12:03 +0100)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
lib/accelerated/cryptodev.c

index bf3e5a7de1c015fc200734801b87e91c70c39824..5897cc2ace0ef9d90f19f399de9e50a13379983e 100644 (file)
@@ -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];