Skip to contentSkip to conversation

crypto: ensure we use a predictable TLS priority setting

PATCH Superseded Daniel P. Berrangé 2 participants 2 messages Feb 28, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: ensure we use a predictable TLS priority setting

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.

---
 tests/test-crypto-tlssession.c | 1 +
 1 file changed, 1 insertion(+)
tests/test-crypto-tlssession.c +1 -0
index 1a4a066d76..82f21c27f2 100644
@@ -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,
Signature · 1 line
2.14.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Daniel P. Berrangé

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.

---
  tests/test-crypto-tlssession.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 14 lines
tests/test-crypto-tlssession.c +1 -0
index 1a4a066d76..82f21c27f2 100644
@@ -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,
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org