From nobody Thu Apr 25 20:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526385845464282.8759134262399; Tue, 15 May 2018 05:04:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2759D3158BCD; Tue, 15 May 2018 12:04:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE04D30B2002; Tue, 15 May 2018 12:04:01 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7862914B1B; Tue, 15 May 2018 12:04:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4FC3v57024758 for ; Tue, 15 May 2018 08:03:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id EA94C2024CAB; Tue, 15 May 2018 12:03:56 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8FFDF2024CBA for ; Tue, 15 May 2018 12:03:56 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 15 May 2018 14:03:47 +0200 Message-Id: <2674be5d126c401e85c9903b059972bc8767ab8d.1526385621.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/8] virCryptoHashBuf: return the length of the hash in bytes X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 15 May 2018 12:04:04 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 virCryptoHashString also needs to know the size of the returned hash. Return it if the hash conversion succeeded so the caller does not need to access the hashinfo array. This should make virCryptoHashString build without gnutls. Also fixes the missing return value for the virCryptoHashBuf stub. Signed-off-by: J=C3=A1n Tomko Suggested-by: Stefan Berger --- src/util/vircrypto.c | 14 ++++++++------ src/util/vircrypto.h | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/util/vircrypto.c b/src/util/vircrypto.c index 62a027353b..d110adfe59 100644 --- a/src/util/vircrypto.c +++ b/src/util/vircrypto.c @@ -54,7 +54,7 @@ struct virHashInfo { =20 verify(ARRAY_CARDINALITY(hashinfo) =3D=3D VIR_CRYPTO_HASH_LAST); =20 -int +ssize_t virCryptoHashBuf(virCryptoHash hash, const char *input, unsigned char *output) @@ -74,16 +74,17 @@ virCryptoHashBuf(virCryptoHash hash, return -1; } =20 - return 0; + return hashinfo[hash].hashlen; } #else -int +ssize_t virCryptoHashBuf(virCryptoHash hash, const char *input ATTRIBUTE_UNUSED, unsigned char *output ATTRIBUTE_UNUSED) { virReportError(VIR_ERR_INVALID_ARG, _("algorithm=3D%d is not supported"), hash); + return -1; } #endif =20 @@ -93,18 +94,19 @@ virCryptoHashString(virCryptoHash hash, char **output) { unsigned char buf[VIR_CRYPTO_LARGEST_DIGEST_SIZE]; + ssize_t rc; size_t hashstrlen; size_t i; =20 - if (virCryptoHashBuf(hash, input, buf) < 0) + if ((rc =3D virCryptoHashBuf(hash, input, buf)) < 0) return -1; =20 - hashstrlen =3D (hashinfo[hash].hashlen * 2) + 1; + hashstrlen =3D (rc * 2) + 1; =20 if (VIR_ALLOC_N(*output, hashstrlen) < 0) return -1; =20 - for (i =3D 0; i < hashinfo[hash].hashlen; i++) { + for (i =3D 0; i < rc; i++) { (*output)[i * 2] =3D hex[(buf[i] >> 4) & 0xf]; (*output)[(i * 2) + 1] =3D hex[buf[i] & 0xf]; } diff --git a/src/util/vircrypto.h b/src/util/vircrypto.h index 64984006be..9b5dada53d 100644 --- a/src/util/vircrypto.h +++ b/src/util/vircrypto.h @@ -41,7 +41,7 @@ typedef enum { VIR_CRYPTO_CIPHER_LAST } virCryptoCipher; =20 -int +ssize_t virCryptoHashBuf(virCryptoHash hash, const char *input, unsigned char *output) --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 20:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526385850945572.8804389215616; Tue, 15 May 2018 05:04:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 085A030C4088; Tue, 15 May 2018 12:04:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA2C62A184; Tue, 15 May 2018 12:04:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6CA5D180B5B2; Tue, 15 May 2018 12:04:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4FC3vEp024764 for ; Tue, 15 May 2018 08:03:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8B457200BCE4; Tue, 15 May 2018 12:03:57 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 311D02017D16 for ; Tue, 15 May 2018 12:03:57 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 15 May 2018 14:03:48 +0200 Message-Id: <19a0a8ee7ee6fca629d727b4590c6dd8e65019e1.1526385621.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/8] Skip vircryptotest and virfilecachetest without gnutls X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 15 May 2018 12:04:09 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Fix make check without gnutls. Signed-off-by: J=C3=A1n Tomko --- tests/vircryptotest.c | 26 ++++++++++++++++++-------- tests/virfilecachetest.c | 19 +++++++++++++++---- 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/tests/vircryptotest.c b/tests/vircryptotest.c index e24834c16e..d9ffc6f34c 100644 --- a/tests/vircryptotest.c +++ b/tests/vircryptotest.c @@ -20,12 +20,13 @@ =20 #include =20 -#include "vircrypto.h" -#include "virrandom.h" - #include "testutils.h" =20 -#define VIR_FROM_THIS VIR_FROM_NONE +#if WITH_GNUTLS +# include "vircrypto.h" +# include "virrandom.h" + +# define VIR_FROM_THIS VIR_FROM_NONE =20 struct testCryptoHashData { virCryptoHash hash; @@ -129,7 +130,7 @@ mymain(void) 0x1b, 0x8c, 0x3f, 0x48, 0x27, 0xae, 0xb6, 0x7a}; =20 -#define VIR_CRYPTO_HASH(h, i, o) \ +# define VIR_CRYPTO_HASH(h, i, o) \ do { \ struct testCryptoHashData data =3D { \ .hash =3D h, \ @@ -152,9 +153,9 @@ mymain(void) VIR_CRYPTO_HASH(VIR_CRYPTO_HASH_MD5, "The quick brown fox", "a2004f377= 30b9445670a738fa0fc9ee5"); VIR_CRYPTO_HASH(VIR_CRYPTO_HASH_SHA256, "The quick brown fox", "5cac4f= 980fedc3d3f1f99b4be3472c9b30d56523e632d151237ec9309048bda9"); =20 -#undef VIR_CRYPTO_HASH +# undef VIR_CRYPTO_HASH =20 -#define VIR_CRYPTO_ENCRYPT(a, n, i, il, c, cl) \ +# define VIR_CRYPTO_ENCRYPT(a, n, i, il, c, cl) \ do { \ struct testCryptoEncryptData data =3D { \ .algorithm =3D a, \ @@ -173,10 +174,19 @@ mymain(void) VIR_CRYPTO_ENCRYPT(VIR_CRYPTO_CIPHER_AES256CBC, "aes265cbc", secretdata, 7, expected_ciphertext, 16); =20 -#undef VIR_CRYPTO_ENCRYPT +# undef VIR_CRYPTO_ENCRYPT =20 return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 /* Forces usage of not so random virRandomBytes */ VIR_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virrandommock.so") +#else +static int +mymain(void) +{ + return EXIT_AM_SKIP; +} + +VIR_TEST_MAIN(mymain); +#endif /* WITH_GNUTLS */ diff --git a/tests/virfilecachetest.c b/tests/virfilecachetest.c index 3c55cd1e02..44386742e1 100644 --- a/tests/virfilecachetest.c +++ b/tests/virfilecachetest.c @@ -20,11 +20,13 @@ #include =20 #include "testutils.h" -#include "virfile.h" -#include "virfilecache.h" =20 +#if WITH_GNUTLS +# include "virfile.h" +# include "virfilecache.h" =20 -#define VIR_FROM_THIS VIR_FROM_NONE + +# define VIR_FROM_THIS VIR_FROM_NONE =20 =20 struct _testFileCacheObj { @@ -212,7 +214,7 @@ mymain(void) =20 virFileCacheSetPriv(cache, &testPriv); =20 -#define TEST_RUN(name, newData, expectData, expectSave) \ +# define TEST_RUN(name, newData, expectData, expectSave) \ do { \ testFileCacheData data =3D { \ cache, name, newData, expectData, expectSave \ @@ -233,3 +235,12 @@ mymain(void) } =20 VIR_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virfilecachemock.so") +#else +static int +mymain(void) +{ + return EXIT_AM_SKIP; +} + +VIR_TEST_MAIN(mymain); +#endif /* WITH_GNUTLS */ --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 20:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152638584466826.29453598330406; Tue, 15 May 2018 05:04:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0D06D91792; Tue, 15 May 2018 12:04:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C914617AB; Tue, 15 May 2018 12:04:01 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 23F6F180124B; Tue, 15 May 2018 12:04:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4FC3wlY024773 for ; Tue, 15 May 2018 08:03:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2C9E52024CBA; Tue, 15 May 2018 12:03:58 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C67F82024CAB for ; Tue, 15 May 2018 12:03:57 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 15 May 2018 14:03:49 +0200 Message-Id: <11df9987fca82c8cda2b83b871ec6d4d5359cf6a.1526385621.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/8] Require GnuTLS >= 3.2.0 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 15 May 2018 12:04:03 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Ubuntu 14.04 which is not targetted as a supported platform [0] already has 3.2.11 [0] https://libvirt.org/platforms.html Signed-off-by: J=C3=A1n Tomko --- m4/virt-gnutls.m4 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/m4/virt-gnutls.m4 b/m4/virt-gnutls.m4 index e3869f75cc..13399ac766 100644 --- a/m4/virt-gnutls.m4 +++ b/m4/virt-gnutls.m4 @@ -18,11 +18,15 @@ dnl . dnl =20 AC_DEFUN([LIBVIRT_ARG_GNUTLS],[ - LIBVIRT_ARG_WITH_FEATURE([GNUTLS], [gnutls], [check], [2.2.0]) + LIBVIRT_ARG_WITH_FEATURE([GNUTLS], [gnutls], [check], [3.2.0]) ]) =20 AC_DEFUN([LIBVIRT_CHECK_GNUTLS],[ - LIBVIRT_CHECK_PKG([GNUTLS], [gnutls], [2.2.0]) + LIBVIRT_CHECK_PKG([GNUTLS], [gnutls], [3.2.0]) + + dnl Require gnutls >=3D 3.2.0 because of 3.2.11 in Ubuntu 14.04 + dnl That should have all the functions we use (in >=3D 2.12) + dnl and also use nettle, because it's >=3D 3.0 =20 if test "$with_gnutls" =3D "yes" ; then dnl Double probe: gnutls >=3D 2.12 had a configure option for gcrypt a= nd --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 20:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152638585061475.82570770205393; Tue, 15 May 2018 05:04:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 73050424E0; Tue, 15 May 2018 12:04:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 342C530BE003; Tue, 15 May 2018 12:04:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DE86B14B1B; Tue, 15 May 2018 12:04:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4FC3wwn024780 for ; Tue, 15 May 2018 08:03:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB96A2026DFD; Tue, 15 May 2018 12:03:58 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 684432024CAB for ; Tue, 15 May 2018 12:03:58 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 15 May 2018 14:03:50 +0200 Message-Id: <2da517511f1ab4683fd38e55572d43ada81aab9b.1526385621.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/8] Deprecate GNUTLS_GCRYPT X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 15 May 2018 12:04:09 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Now that we assume GnuTLS >=3D 3.0, we can ditch gcrypt support. Introduced by . Signed-off-by: J=C3=A1n Tomko --- config-post.h | 2 -- m4/virt-gnutls.m4 | 29 ------------------- src/libvirt.c | 83 ---------------------------------------------------= ---- 3 files changed, 114 deletions(-) diff --git a/config-post.h b/config-post.h index f7eba0d7ca..063e30fa37 100644 --- a/config-post.h +++ b/config-post.h @@ -36,7 +36,6 @@ # undef WITH_DEVMAPPER # undef WITH_DTRACE_PROBES # undef WITH_GNUTLS -# undef WITH_GNUTLS_GCRYPT # undef WITH_LIBSSH # undef WITH_MACVTAP # undef WITH_NUMACTL @@ -62,7 +61,6 @@ # undef WITH_DEVMAPPER # undef WITH_DTRACE_PROBES # undef WITH_GNUTLS -# undef WITH_GNUTLS_GCRYPT # undef WITH_LIBSSH # undef WITH_MACVTAP # undef WITH_NUMACTL diff --git a/m4/virt-gnutls.m4 b/m4/virt-gnutls.m4 index 13399ac766..35792c060f 100644 --- a/m4/virt-gnutls.m4 +++ b/m4/virt-gnutls.m4 @@ -29,35 +29,6 @@ AC_DEFUN([LIBVIRT_CHECK_GNUTLS],[ dnl and also use nettle, because it's >=3D 3.0 =20 if test "$with_gnutls" =3D "yes" ; then - dnl Double probe: gnutls >=3D 2.12 had a configure option for gcrypt a= nd - dnl gnutls >=3D 3.0 uses only nettle. Our goal is to avoid gcrypt if = we - dnl can prove gnutls uses nettle, but it is a safe fallback to use gcr= ypt - dnl if we can't prove anything. - - GNUTLS_GCRYPT=3D - if $PKG_CONFIG --exists 'gnutls >=3D 3.0'; then - GNUTLS_GCRYPT=3D"no" - else - GNUTLS_GCRYPT=3D"probe" - fi - - if test "$GNUTLS_GCRYPT" =3D "probe"; then - case $($PKG_CONFIG --libs --static gnutls) in - *gcrypt*) GNUTLS_GCRYPT=3Dyes ;; - *nettle*) GNUTLS_GCRYPT=3Dno ;; - *) GNUTLS_GCRYPT=3Dunknown ;; - esac - fi - - if test "$GNUTLS_GCRYPT" =3D "yes" || test "$GNUTLS_GCRYPT" =3D "unkno= wn"; then - GNUTLS_LIBS=3D"$GNUTLS_LIBS -lgcrypt" - dnl We're not using gcrypt deprecated features so define - dnl GCRYPT_NO_DEPRECATED to avoid deprecated warnings - GNUTLS_CFLAGS=3D"$GNUTLS_CFLAGS -DGCRYPT_NO_DEPRECATED" - AC_DEFINE_UNQUOTED([WITH_GNUTLS_GCRYPT], 1, - [set to 1 if it is known or assumed that GNUTLS u= ses gcrypt]) - fi - OLD_CFLAGS=3D"$CFLAGS" OLD_LIBS=3D"$LIBS" CFLAGS=3D"$CFLAGS $GNUTLS_CFLAGS" diff --git a/src/libvirt.c b/src/libvirt.c index 0a81cbfb99..ffb002f4e1 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -54,9 +54,6 @@ #include "configmake.h" #include "virconf.h" #if WITH_GNUTLS -# if WITH_GNUTLS_GCRYPT -# include -# endif # include "rpc/virnettlscontext.h" #endif #include "vircommand.h" @@ -243,70 +240,6 @@ virWinsockInit(void) #endif =20 =20 -#ifdef WITH_GNUTLS_GCRYPT -static int -virTLSMutexInit(void **priv) -{ - virMutexPtr lock =3D NULL; - - if (VIR_ALLOC_QUIET(lock) < 0) - return ENOMEM; - - if (virMutexInit(lock) < 0) { - VIR_FREE(lock); - return errno; - } - - *priv =3D lock; - return 0; -} - - -static int -virTLSMutexDestroy(void **priv) -{ - virMutexPtr lock =3D *priv; - virMutexDestroy(lock); - VIR_FREE(lock); - return 0; -} - - -static int -virTLSMutexLock(void **priv) -{ - virMutexPtr lock =3D *priv; - virMutexLock(lock); - return 0; -} - - -static int -virTLSMutexUnlock(void **priv) -{ - virMutexPtr lock =3D *priv; - virMutexUnlock(lock); - return 0; -} - - -static struct gcry_thread_cbs virTLSThreadImpl =3D { - /* GCRY_THREAD_OPTION_VERSION was added in gcrypt 1.4.2 */ -# ifdef GCRY_THREAD_OPTION_VERSION - (GCRY_THREAD_OPTION_PTHREAD | (GCRY_THREAD_OPTION_VERSION << 8)), -# else - GCRY_THREAD_OPTION_PTHREAD, -# endif - NULL, - virTLSMutexInit, - virTLSMutexDestroy, - virTLSMutexLock, - virTLSMutexUnlock, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL -}; -#endif /* WITH_GNUTLS_GCRYPT */ - - static bool virGlobalError; static virOnceControl virGlobalOnce =3D VIR_ONCE_CONTROL_INITIALIZER; =20 @@ -330,22 +263,6 @@ virGlobalInit(void) } #endif =20 -#ifdef WITH_GNUTLS_GCRYPT - /* - * This sequence of API calls it copied exactly from - * gnutls 2.12.23 source lib/gcrypt/init.c, with - * exception that GCRYCTL_ENABLE_QUICK_RANDOM, is - * dropped - */ - if (gcry_control(GCRYCTL_ANY_INITIALIZATION_P) =3D=3D 0) { - gcry_control(GCRYCTL_SET_THREAD_CBS, &virTLSThreadImpl); - gcry_check_version(NULL); - - gcry_control(GCRYCTL_DISABLE_SECMEM, NULL, 0); - gcry_control(GCRYCTL_INITIALIZATION_FINISHED, NULL, 0); - } -#endif - virLogSetFromEnv(); =20 #ifdef WITH_GNUTLS --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 20:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526385849476595.883365120639; Tue, 15 May 2018 05:04:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CB4BCC0EF9AE; Tue, 15 May 2018 12:04:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9072E100191C; Tue, 15 May 2018 12:04:06 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DB165180B536; Tue, 15 May 2018 12:04:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4FC3xaZ024785 for ; Tue, 15 May 2018 08:03:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6C7D42024CAB; Tue, 15 May 2018 12:03:59 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 11F6B200BCE4 for ; Tue, 15 May 2018 12:03:58 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 15 May 2018 14:03:51 +0200 Message-Id: <9096e1b0e01b91a9d12fda3a7bb7d89fe5a3e0a2.1526385621.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/8] Remove explicit check for gnutls_rnd X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 15 May 2018 12:04:08 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Introduced in gnutls 2.12, but we require gnutls >=3D 3.2 Check added by commit <2d23d14>. Signed-off-by: J=C3=A1n Tomko --- m4/virt-gnutls.m4 | 1 - src/util/vircrypto.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/m4/virt-gnutls.m4 b/m4/virt-gnutls.m4 index 35792c060f..8c720c0cd7 100644 --- a/m4/virt-gnutls.m4 +++ b/m4/virt-gnutls.m4 @@ -37,7 +37,6 @@ AC_DEFUN([LIBVIRT_CHECK_GNUTLS],[ #include ]]) =20 - AC_CHECK_FUNCS([gnutls_rnd]) AC_CHECK_FUNCS([gnutls_cipher_encrypt]) CFLAGS=3D"$OLD_CFLAGS" LIBS=3D"$OLD_LIBS" diff --git a/src/util/vircrypto.c b/src/util/vircrypto.c index d110adfe59..9bee04fcf9 100644 --- a/src/util/vircrypto.c +++ b/src/util/vircrypto.c @@ -336,7 +336,7 @@ virCryptoGenerateRandom(size_t nbytes) if (VIR_ALLOC_N(buf, nbytes) < 0) return NULL; =20 -#if HAVE_GNUTLS_RND +#if WITH_GNUTLS /* Generate the byte stream using gnutls_rnd() if possible */ if ((ret =3D gnutls_rnd(GNUTLS_RND_RANDOM, buf, nbytes)) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 20:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152638585476687.72634866074429; Tue, 15 May 2018 05:04:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 08F7315F44C; Tue, 15 May 2018 12:04:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AA121617B9; Tue, 15 May 2018 12:04:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 561AF14B20; Tue, 15 May 2018 12:04:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4FC40T4024790 for ; Tue, 15 May 2018 08:04:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0E20A200BCE4; Tue, 15 May 2018 12:04:00 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A7E342026DFD for ; Tue, 15 May 2018 12:03:59 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 15 May 2018 14:03:52 +0200 Message-Id: <05a1f601b236d702a88e9c8744b2b427d9e3c927.1526385621.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/8] Remove explicit check for gnutls_cipher_encrypt X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 15 May 2018 12:04:13 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Introduced in gnutls 2.10, and we assume >=3D 3.2. Commit 1ce9c08a added this check. Signed-off-by: J=C3=A1n Tomko --- 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 ]]) =20 - AC_CHECK_FUNCS([gnutls_cipher_encrypt]) CFLAGS=3D"$OLD_CFLAGS" LIBS=3D"$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) { =20 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) } =20 =20 -#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) =20 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, --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 20:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526385855372555.7566446308423; Tue, 15 May 2018 05:04:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E7D6AFAA93; Tue, 15 May 2018 12:04:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4C3C60A9D; Tue, 15 May 2018 12:04:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4CE57180B5AB; Tue, 15 May 2018 12:04:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4FC40L3024800 for ; Tue, 15 May 2018 08:04:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id A35B12024CAB; Tue, 15 May 2018 12:04:00 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 493EF2024CBA for ; Tue, 15 May 2018 12:04:00 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 15 May 2018 14:03:53 +0200 Message-Id: <3c4b9d9ab2bbed4b838151ecba6718de42141aed.1526385621.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 7/8] Fix indentation in virCryptoHaveCipher X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 15 May 2018 12:04:14 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: J=C3=A1n Tomko --- src/util/vircrypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/vircrypto.c b/src/util/vircrypto.c index d789129a86..2118fdba22 100644 --- a/src/util/vircrypto.c +++ b/src/util/vircrypto.c @@ -132,9 +132,9 @@ virCryptoHaveCipher(virCryptoCipher algorithm) =20 case VIR_CRYPTO_CIPHER_AES256CBC: #ifdef WITH_GNUTLS - return true; + return true; #else - return false; + return false; #endif =20 case VIR_CRYPTO_CIPHER_NONE: --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 20:08:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526385857995892.2422161003433; Tue, 15 May 2018 05:04:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 06AE9C0D18A4; Tue, 15 May 2018 12:04:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0944608EF; Tue, 15 May 2018 12:04:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 646ED4BB79; Tue, 15 May 2018 12:04:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4FC418X024811 for ; Tue, 15 May 2018 08:04:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 447062024CAB; Tue, 15 May 2018 12:04:01 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE7802024CBA for ; Tue, 15 May 2018 12:04:00 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 15 May 2018 14:03:54 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 8/8] Remove check for gnutls/crypto.h X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 15 May 2018 12:04:17 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Assume its presence for gnutls >=3D 3.2. Check introduced by . Signed-off-by: J=C3=A1n Tomko --- m4/virt-gnutls.m4 | 13 ------------- src/rpc/virnettlscontext.c | 4 +--- src/util/vircrypto.c | 4 +--- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/m4/virt-gnutls.m4 b/m4/virt-gnutls.m4 index f25cfb60f7..426a1a0348 100644 --- a/m4/virt-gnutls.m4 +++ b/m4/virt-gnutls.m4 @@ -27,19 +27,6 @@ AC_DEFUN([LIBVIRT_CHECK_GNUTLS],[ dnl Require gnutls >=3D 3.2.0 because of 3.2.11 in Ubuntu 14.04 dnl That should have all the functions we use (in >=3D 2.12) dnl and also use nettle, because it's >=3D 3.0 - - if test "$with_gnutls" =3D "yes" ; then - OLD_CFLAGS=3D"$CFLAGS" - OLD_LIBS=3D"$LIBS" - CFLAGS=3D"$CFLAGS $GNUTLS_CFLAGS" - LIBS=3D"$LIBS $GNUTLS_LIBS" - AC_CHECK_HEADERS([gnutls/crypto.h], [], [], [[ - #include - ]]) - - CFLAGS=3D"$OLD_CFLAGS" - LIBS=3D"$OLD_LIBS" - fi ]) =20 AC_DEFUN([LIBVIRT_RESULT_GNUTLS],[ diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index 2c46aebf31..97b74de89e 100644 --- a/src/rpc/virnettlscontext.c +++ b/src/rpc/virnettlscontext.c @@ -25,9 +25,7 @@ #include =20 #include -#if HAVE_GNUTLS_CRYPTO_H -# include -#endif +#include #include =20 #include "virnettlscontext.h" diff --git a/src/util/vircrypto.c b/src/util/vircrypto.c index 2118fdba22..bbc2a01f22 100644 --- a/src/util/vircrypto.c +++ b/src/util/vircrypto.c @@ -28,9 +28,7 @@ =20 #ifdef WITH_GNUTLS # include -# if HAVE_GNUTLS_CRYPTO_H -# include -# endif +# include #endif =20 VIR_LOG_INIT("util.crypto"); --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list