Clean TLS_CTX/CONNECT

This commit is contained in:
Zhi Guan
2026-06-12 12:01:30 +08:00
parent 30bc6a2a4c
commit fb93fba5ff
5 changed files with 73 additions and 116 deletions

View File

@@ -329,7 +329,7 @@ bad:
perror("fopen");
goto end;
}
if (x509_certs_to_pem(conn.server_certs, conn.server_certs_len, certoutfp) != 1) {
if (x509_certs_to_pem(conn.peer_cert_chain, conn.peer_cert_chain_len, certoutfp) != 1) {
fprintf(stderr, "%s: x509_certs_to_pem error\n", prog);
fclose(certoutfp);
goto end;