Skip to content

Commit

Permalink
TLS: Support chain certs in --cert. (#201)
Browse files Browse the repository at this point in the history
Fixes #197.
  • Loading branch information
yossigo authored Feb 1, 2023
1 parent 6a5fe6a commit 15edf14
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions memtier_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1291,8 +1291,7 @@ int main(int argc, char *argv[])
SSL_CTX_set_options(cfg.openssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);

if (cfg.tls_cert) {
if (!SSL_CTX_use_certificate_file(cfg.openssl_ctx, cfg.tls_cert,
SSL_FILETYPE_PEM)) {
if (!SSL_CTX_use_certificate_chain_file(cfg.openssl_ctx, cfg.tls_cert)) {
ERR_print_errors_fp(stderr);
fprintf(stderr, "Error: Failed to load certificate file.\n");
exit(1);
Expand Down

0 comments on commit 15edf14

Please sign in to comment.