Add client_cert_optional to tlcp/tls12

This commit is contained in:
Zhi Guan
2026-06-17 16:42:29 +08:00
parent 765e4d7747
commit b0e5c4aa1b
10 changed files with 30 additions and 16 deletions

View File

@@ -3015,6 +3015,16 @@ int tls_ctx_set_key_update_seq_num_limit(TLS_CTX *ctx, size_t max_seq_num)
return 1;
}
int tls_ctx_enable_client_certificate_optional(TLS_CTX *ctx, int enable)
{
if (!ctx) {
error_print();
return -1;
}
ctx->client_certificate_optional = enable ? 1 : 0;
return 1;
}
static int tls_ctx_get_certificate_chain(const TLS_CTX *ctx, size_t idx,
const uint8_t **cert_chain, size_t *cert_chain_len)
{