]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
crypto: ensure we use a predictable TLS priority setting
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 28 Feb 2018 14:04:38 +0000 (14:04 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 21 Jun 2018 01:45:08 +0000 (20:45 -0500)
The TLS test cert generation relies on a fixed set of algorithms that are
only usable under GNUTLS' default priority setting. When building QEMU
with a custom distro specific priority setting, this can cause the TLS
tests to fail. By forcing the tests to always use "NORMAL" priority we
can make them more robust.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit 057ad0b46992e3ec4ce29b9103162aa3c683f347)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
tests/test-crypto-tlssession.c
tests/test-io-channel-tls.c

index 1a4a066d76c8597bfd06ca091e8082e35e4da916..82f21c27f270bc10f9e72e0beec33b6024d87df4 100644 (file)
@@ -75,6 +75,7 @@ static QCryptoTLSCreds *test_tls_creds_create(QCryptoTLSCredsEndpoint endpoint,
                      "server" : "client"),
         "dir", certdir,
         "verify-peer", "yes",
+        "priority", "NORMAL",
         /* We skip initial sanity checks here because we
          * want to make sure that problems are being
          * detected at the TLS session validation stage,
index a210d01ba538a77a10ab5d8635d3f6072ae19afb..47ba603e8d8787c94829c0e29c5090d33fedef3f 100644 (file)
@@ -78,6 +78,7 @@ static QCryptoTLSCreds *test_tls_creds_create(QCryptoTLSCredsEndpoint endpoint,
                      "server" : "client"),
         "dir", certdir,
         "verify-peer", "yes",
+        "priority", "NORMAL",
         /* We skip initial sanity checks here because we
          * want to make sure that problems are being
          * detected at the TLS session validation stage,