Skip to content

--enable-ech conflicts with --enable-harden-tls: HAVE_TRUNCATED_HMAC forced on #10067

@cpsource

Description

@cpsource

Version

5.9.0

Description

Enabling ECH (--enable-ech) alongside --enable-harden-tls fails to build with:

#error "Truncated HMAC Extension not allowed"

This happens because --enable-ech requires TLS extensions (ENABLED_TLSX), and the TLSX bundle unconditionally forces HAVE_TRUNCATED_HMAC on at configure.ac:7743:

if test "x$ENABLED_TLSX" = "xyes"
then
    ENABLED_SNI=yes
    ENABLED_MAX_FRAGMENT=yes
    ENABLED_TRUNCATED_HMAC=yes    # <-- forced on
    ENABLED_ALPN=yes

This conflicts with WOLFSSL_HARDEN_TLS which prohibits truncated HMAC per RFC 9325 Section 4.6 (settings.h:4747).

Workaround

Pass CFLAGS="-DWOLFSSL_HARDEN_TLS_ALLOW_TRUNCATED_HMAC" to suppress the error. Truncated HMAC is compiled in but does not weaken ECH itself.

Suggested fix

The TLSX bundle should not force HAVE_TRUNCATED_HMAC when WOLFSSL_HARDEN_TLS is active. Either:

  1. Skip setting ENABLED_TRUNCATED_HMAC=yes when --enable-harden-tls is also set, or
  2. Break the TLSX bundle into individual extensions so ECH can pull in only what it needs (SNI, ALPN) without dragging in truncated HMAC.

Reproduce

./configure --enable-harden-tls --enable-ech
make

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions