Skip to content
Snippets Groups Projects
Closed gnutls_priority_set in post client hello function breaks handshake for clients with TLS versions < 1.3
  • View options
  • gnutls_priority_set in post client hello function breaks handshake for clients with TLS versions < 1.3

  • View options
  • Closed Issue created by Airtower

    If a server calls gnutls_priority_set in a post client hello function the handshake breaks unless both peers support TLS 1.3. This breaks servers that allow virtual hosts (using SNI) that may have different priority settings because they have to load the right priorities after parsing the SNI.

    I discovered the problem while testing mod_gnutls with GnuTLS 3.6.4 (at commit 1c0b4baa). The distro-provided version 3.5.18 works as expected.

    Steps to Reproduce:

    1. Compile prio-issue-repro.c (slightly modified version of the echo server example doc/examples/ex-serv-x509.c)
    2. Run the binary (expects a certificate server/x509.pem and private key server/secret.key) and try the following client commands.
    3. gnutls-cli -p 5556 localhost --insecure --priority=NORMAL
    4. gnutls-cli -p 5556 localhost --insecure --priority=NORMAL:-VERS-TLS1.3

    (--insecure just to ignore certificate validation)

    Actual results:

    The first gnutls-cli call connects successfully and you can use the echo server. The second one fails, the server logs Handshake has failed (No supported cipher suites have been found.)

    Expected results:

    Both client commands should work. If you comment the CHECK(gnutls_priority_set(session, *p)); line in the hello_prio function they do, which is why I believe the issue is triggered by gnutls_priority_set.

    Edited by Airtower

    Linked items 0

  • Link items together to show that they're related or that one is blocking others.

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading