mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-29 01:03:38 +08:00
Update tests
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user