vtls: feature ssls-export for SSL session im-/export

Adds the experimental feature `ssls-export` to libcurl and curl for
importing and exporting SSL sessions from/to a file.

* add functions to libcurl API
* add command line option `--ssl-sessions <filename>` to curl
* add documenation
* add support in configure
* add support in cmake
+ add pytest case

Closes #15924
This commit is contained in:
Stefan Eissing 2025-01-07 12:41:26 +01:00 committed by Daniel Stenberg
parent 8a1ee2b47d
commit 515a21f350
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
48 changed files with 1662 additions and 125 deletions

View file

@ -300,6 +300,7 @@ static const struct LongShort aliases[]= {
{"ssl-no-revoke", ARG_BOOL, ' ', C_SSL_NO_REVOKE},
{"ssl-reqd", ARG_BOOL, ' ', C_SSL_REQD},
{"ssl-revoke-best-effort", ARG_BOOL, ' ', C_SSL_REVOKE_BEST_EFFORT},
{"ssl-sessions", ARG_FILE, ' ', C_SSL_SESSIONS},
{"sslv2", ARG_NONE, '2', C_SSLV2},
{"sslv3", ARG_NONE, '3', C_SSLV3},
{"stderr", ARG_FILE, ' ', C_STDERR},
@ -2470,6 +2471,12 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
if(feature_ssl)
config->ssl_revoke_best_effort = TRUE;
break;
case C_SSL_SESSIONS: /* --ssl-sessions */
if(feature_ssls_export)
err = getstr(&global->ssl_sessions, nextarg, DENY_BLANK);
else
err = PARAM_LIBCURL_DOESNT_SUPPORT;
break;
case C_TCP_FASTOPEN: /* --tcp-fastopen */
config->tcp_fastopen = TRUE;
break;