[libvirt] [PATCH v2] virnettlscontexttest fails with GNUTLS 3.0.28

On openSUSE 12.x with GNUTLS 3.0.28, virnettlscontexttest fails. It has been reported to work from GNUTLS 3.1.11 on Fedora 19. Changed the constraints on gnutls to 3.1+ for unit test cacert4req. --- v2: Changed the condition for 4.0 to work and made commit message more explicit. tests/virnettlscontexttest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/virnettlscontexttest.c b/tests/virnettlscontexttest.c index fc512fc..f3917bf 100644 --- a/tests/virnettlscontexttest.c +++ b/tests/virnettlscontexttest.c @@ -268,7 +268,9 @@ mymain(void) * be rejected. GNUTLS < 3 does not reject it and * we don't anticipate them changing this behaviour */ - DO_CTX_TEST(true, cacert4req.filename, servercert4req.filename, GNUTLS_VERSION_MAJOR >= 3); + DO_CTX_TEST(true, cacert4req.filename, servercert4req.filename, + (GNUTLS_VERSION_MAJOR == 3 && GNUTLS_VERSION_MINOR >= 1) || + GNUTLS_VERSION_MAJOR > 3); DO_CTX_TEST(true, cacert5req.filename, servercert5req.filename, true); DO_CTX_TEST(true, cacert6req.filename, servercert6req.filename, true); -- 1.8.4.4

On 12/23/2013 01:01 AM, Cédric Bosdonnat wrote:
On openSUSE 12.x with GNUTLS 3.0.28, virnettlscontexttest fails. It has been reported to work from GNUTLS 3.1.11 on Fedora 19. Changed the constraints on gnutls to 3.1+ for unit test cacert4req. --- v2: Changed the condition for 4.0 to work and made commit message more explicit.
ACK and pushed with one tweak:
tests/virnettlscontexttest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/virnettlscontexttest.c b/tests/virnettlscontexttest.c index fc512fc..f3917bf 100644 --- a/tests/virnettlscontexttest.c +++ b/tests/virnettlscontexttest.c @@ -268,7 +268,9 @@ mymain(void) * be rejected. GNUTLS < 3 does not reject it and
I updated this comment to match.
* we don't anticipate them changing this behaviour */ - DO_CTX_TEST(true, cacert4req.filename, servercert4req.filename, GNUTLS_VERSION_MAJOR >= 3); + DO_CTX_TEST(true, cacert4req.filename, servercert4req.filename, + (GNUTLS_VERSION_MAJOR == 3 && GNUTLS_VERSION_MINOR >= 1) || + GNUTLS_VERSION_MAJOR > 3); DO_CTX_TEST(true, cacert5req.filename, servercert5req.filename, true); DO_CTX_TEST(true, cacert6req.filename, servercert6req.filename, true);
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Cédric Bosdonnat
-
Eric Blake