Update tests

This commit is contained in:
Zhi Guan
2026-06-20 23:10:17 +08:00
parent 1577bc7934
commit 6736825c7a
22 changed files with 497 additions and 84 deletions

View File

@@ -102,7 +102,7 @@ int certverify_main(int argc, char **argv)
char *crlfile = NULL;
char *ocspfile = NULL;
char *hostname = NULL;
int chain_type = TLS_cert_chain_tlcp_server;
int chain_type = 0;
uint8_t *certs = NULL;
size_t certslen = 0;
uint8_t *cacerts = NULL;
@@ -188,6 +188,9 @@ bad:
fprintf(stderr, "%s: '-cacert' option required\n", prog);
goto end;
}
if (!chain_type) {
chain_type = TLS_cert_chain_tlcp_server;
}
if (hostname && chain_type == TLS_cert_chain_client) {
fprintf(stderr, "%s: '-hostname' only allowed with '-tlcp_server' or '-server'\n", prog);
goto end;