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

@@ -386,6 +386,13 @@ bad:
}
}
if (client_cert_optional) {
if (tls_ctx_enable_client_certificate_optional(&ctx, 1) != 1) {
error_print();
goto end;
}
}
if (cacertfile) {
if (tls_ctx_set_ca_certificates(&ctx, cacertfile, verify_depth) != 1) {
fprintf(stderr, "%s: failed to load CA certificate\n", prog);