curl/lib/vtls
Viktor Szakats bf9d9fe0bd
multissl: initialize when requesting a random number
To fix test 1308 in MultiSSL builds.

Failure was caused by the random number generator virtual function being
NULL, instead of pointing to the implementation in the runtime-selected
TLS backend. This could happen in MultiSSL builds when a functionality
was asking for a random number without triggering a VTLS function table
initialization first. Such functionality is MIME, or form data via MIME.

The reason CI did not catch it in an earlier MultiSSL GHA/windows job,
is that it was a debug-enabled one. In debug-enabled builds the test
runner was overriding the random number generator for all tests.

Fixed this by moving the override to the tests requiring it, via
1fcf22585f #17971, enabling debug builds
to catch this issue.

Enable MultiSSL in two CI jobs, to verify this patch.

Fixing:
```
test 1308...[formpost tests]

libtests returned 44, when expecting 0
 1308: exit FAILED
[...]
=== Start of file stderr1308
 URL: log/3/test-1308
 tests/libtest/lib1308.c:70 Assertion 'res == 0' FAILED: curl_formget returned error
 tests/libtest/lib1308.c:72 Assertion 'total_size == 518' FAILED: curl_formget got wrong size back
 tests/libtest/lib1308.c:88 Assertion 'res == 0' FAILED: curl_formget returned error
 tests/libtest/lib1308.c:89 Assertion 'total_size == 899' FAILED: curl_formget got wrong size back
```
Ref: https://github.com/curl/curl/actions/runs/16387693424/job/46309536359?pr=17963#step:16:2515

Bug: https://github.com/curl/curl/pull/17963#issuecomment-3092282057

Closes #17970
2025-07-20 12:03:56 +02:00
..
.checksrc checksrc: reduce exceptions, apply again to curlx 2025-06-27 17:33:35 +02:00
cipher_suite.c lib: drop two interim macros in favor of native libcurl API calls 2025-06-30 18:38:56 +02:00
cipher_suite.h TLS: remove support for Secure Transport and BearSSL 2025-06-11 07:54:19 +02:00
gtls.c gnutls: some small cleanups 2025-07-18 00:41:09 +02:00
gtls.h http/3: report handshake with version and cipher as for TCP connections 2025-07-14 14:08:32 +02:00
hostcheck.c lib: drop two interim macros in favor of native libcurl API calls 2025-06-30 18:38:56 +02:00
hostcheck.h openssl: some small cleanups 2025-07-18 00:40:26 +02:00
keylog.c urlapi: use uppercase hex encoding 2025-06-25 11:44:13 +02:00
keylog.h spelling: 'a' vs 'an' 2025-05-30 11:38:35 +02:00
mbedtls.c lib: drop two interim macros in favor of native libcurl API calls 2025-06-30 18:38:56 +02:00
mbedtls.h lib: include files using known path 2025-04-08 17:00:00 +02:00
mbedtls_threadlock.c lib: include files using known path 2025-04-08 17:00:00 +02:00
mbedtls_threadlock.h lib: include files using known path 2025-04-08 17:00:00 +02:00
openssl.c openssl: some small cleanups 2025-07-18 00:40:26 +02:00
openssl.h openssl: some small cleanups 2025-07-18 00:40:26 +02:00
rustls.c lib/vtls: log rustls negotiated KEX group name 2025-07-12 19:26:41 +02:00
rustls.h lib: include files using known path 2025-04-08 17:00:00 +02:00
schannel.c windows: drop redundant curl_wcsdup_callback callback 2025-07-08 13:33:38 +02:00
schannel.h lib: include files using known path 2025-04-08 17:00:00 +02:00
schannel_int.h tidy-up: whitespace/indent 2025-07-14 18:33:43 +02:00
schannel_verify.c tidy-up: two comments 2025-06-15 13:32:24 +02:00
vtls.c multissl: initialize when requesting a random number 2025-07-20 12:03:56 +02:00
vtls.h tidy-up: whitespace 2025-07-11 13:32:54 +02:00
vtls_int.h vtls: change send/recv signatures of tls backends 2025-06-21 10:34:02 +02:00
vtls_scache.c tidy-up: whitespace 2025-07-11 13:32:54 +02:00
vtls_scache.h lib: replace scache no-op macros with #ifdef 2025-06-27 17:33:34 +02:00
vtls_spack.c curlx: move into to curlx/ 2025-05-07 11:01:15 +02:00
vtls_spack.h lib: include files using known path 2025-04-08 17:00:00 +02:00
wolfssl.c connection: clarify transport 2025-07-14 14:33:18 +02:00
wolfssl.h http/3: report handshake with version and cipher as for TCP connections 2025-07-14 14:08:32 +02:00
x509asn1.c misc: fix typos 2025-07-12 08:59:44 +02:00
x509asn1.h TLS: remove support for Secure Transport and BearSSL 2025-06-11 07:54:19 +02:00