]> git.ipfire.org Git - thirdparty/curl.git/commit
tls: remove checks for DEFAULT
authorDaniel Stenberg <daniel@haxx.se>
Tue, 27 Jan 2026 15:59:32 +0000 (16:59 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 27 Jan 2026 22:42:09 +0000 (23:42 +0100)
commit1b50dcc2abd40d60d16c7c9b2fcbfc093c0419d3
tree026f3ef479c77ec3c3f6029df0f73660f3608170
parentae99d750dd3bf44de695669609428902e7b109d9
tls: remove checks for DEFAULT

Since 9d8998c99408e1adf, the setopt code changes input DEFAULT to an
actual more specific TLS version (1.2) for the backends to use and check
for.

This means that the default value (0L) cannot and should not actually be
used when the TLS backends run. This change adds asserts to verify that
and removes code that accepts the DEFAULT value as a valid version with
the TLS version functions' logic.

Applications can still set a specific lower version if they want (1, 1.0
or 1.1).

Closes #20453
lib/vtls/gtls.c
lib/vtls/mbedtls.c
lib/vtls/openssl.c
lib/vtls/rustls.c
lib/vtls/schannel.c
lib/vtls/wolfssl.c