Introduced in gnutls 2.10, and we assume >= 3.2. Commit 1ce9c08a added this check. Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- m4/virt-gnutls.m4 | 1 - src/util/vircrypto.c | 4 ++-- tests/qemuxml2argvtest.c | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/m4/virt-gnutls.m4 b/m4/virt-gnutls.m4 index 8c720c0cd7..f25cfb60f7 100644 --- a/m4/virt-gnutls.m4 +++ b/m4/virt-gnutls.m4 @@ -37,7 +37,6 @@ AC_DEFUN([LIBVIRT_CHECK_GNUTLS],[ #include <gnutls/gnutls.h> ]]) - AC_CHECK_FUNCS([gnutls_cipher_encrypt]) CFLAGS="$OLD_CFLAGS" LIBS="$OLD_LIBS" fi diff --git a/src/util/vircrypto.c b/src/util/vircrypto.c index 9bee04fcf9..d789129a86 100644 --- a/src/util/vircrypto.c +++ b/src/util/vircrypto.c @@ -131,7 +131,7 @@ virCryptoHaveCipher(virCryptoCipher algorithm) switch (algorithm) { case VIR_CRYPTO_CIPHER_AES256CBC: -#ifdef HAVE_GNUTLS_CIPHER_ENCRYPT +#ifdef WITH_GNUTLS return true; #else return false; @@ -146,7 +146,7 @@ virCryptoHaveCipher(virCryptoCipher algorithm) } -#ifdef HAVE_GNUTLS_CIPHER_ENCRYPT +#ifdef WITH_GNUTLS /* virCryptoEncryptDataAESgntuls: * * Performs the AES gnutls encryption diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d4d64b0d21..eb41c27767 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1024,7 +1024,7 @@ mymain(void) DO_TEST("disk-drive-network-sheepdog", NONE); DO_TEST("disk-drive-network-rbd-auth", NONE); DO_TEST("disk-drive-network-source-auth", NONE); -# ifdef HAVE_GNUTLS_CIPHER_ENCRYPT +# ifdef WITH_GNUTLS DO_TEST("disk-drive-network-rbd-auth-AES", QEMU_CAPS_OBJECT_SECRET, QEMU_CAPS_VIRTIO_SCSI); # endif @@ -1320,7 +1320,7 @@ mymain(void) if (VIR_STRDUP_QUIET(driver.config->chardevTLSx509secretUUID, "6fd3f62d-9fe7-4a4e-a869-7acd6376d8ea") < 0) return EXIT_FAILURE; -# ifdef HAVE_GNUTLS_CIPHER_ENCRYPT +# ifdef WITH_GNUTLS DO_TEST("serial-tcp-tlsx509-secret-chardev", QEMU_CAPS_OBJECT_SECRET, QEMU_CAPS_DEVICE_ISA_SERIAL, @@ -1617,7 +1617,7 @@ mymain(void) DO_TEST("encrypted-disk", NONE); DO_TEST("encrypted-disk-usage", NONE); -# ifdef HAVE_GNUTLS_CIPHER_ENCRYPT +# ifdef WITH_GNUTLS DO_TEST("luks-disks", QEMU_CAPS_OBJECT_SECRET); DO_TEST("luks-disks-source", QEMU_CAPS_OBJECT_SECRET); DO_TEST_PARSE_ERROR("luks-disks-source-qcow2", QEMU_CAPS_OBJECT_SECRET); @@ -2310,7 +2310,7 @@ mymain(void) DO_TEST("hostdev-scsi-virtio-iscsi-auth", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_SCSI_GENERIC); -# ifdef HAVE_GNUTLS_CIPHER_ENCRYPT +# ifdef WITH_GNUTLS DO_TEST("disk-hostdev-scsi-virtio-iscsi-auth-AES", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_SCSI_GENERIC, QEMU_CAPS_OBJECT_SECRET, -- 2.16.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list