From a72eef7fb4190e5519bd920d0d6180ab687de209 Mon Sep 17 00:00:00 2001 From: yhirose Date: Tue, 29 Jan 2019 12:05:32 -0500 Subject: [PATCH] Fixed #123 --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index 521657a..b0b5c88 100644 --- a/httplib.h +++ b/httplib.h @@ -2418,7 +2418,7 @@ inline SSLServer::SSLServer(const char* cert_path, const char* private_key_path) // SSL_CTX_set_tmp_ecdh(ctx_, ecdh); // EC_KEY_free(ecdh); - if (SSL_CTX_use_certificate_file(ctx_, cert_path, SSL_FILETYPE_PEM) != 1 || + if (SSL_CTX_use_certificate_chain_file(ctx_, cert_path) != 1 || SSL_CTX_use_PrivateKey_file(ctx_, private_key_path, SSL_FILETYPE_PEM) != 1) { SSL_CTX_free(ctx_); ctx_ = nullptr;