Skip to content

Commit fee6577

Browse files
authored
Fix an error with ssl certificates (#283)
1 parent f9de1dd commit fee6577

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

trantor/net/inner/tlsprovider/OpenSSLProvider.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,9 +806,9 @@ SSLContextPtr trantor::newSSLContext(const TLSPolicy &policy, bool isServer)
806806
isServer);
807807
if (!policy.getCertPath().empty() && !policy.getKeyPath().empty())
808808
{
809-
if (SSL_CTX_use_certificate_file(ctx->ctx(),
810-
policy.getCertPath().data(),
811-
SSL_FILETYPE_PEM) <= 0)
809+
if (SSL_CTX_use_certificate_chain_file(ctx->ctx(),
810+
policy.getCertPath().data()) <=
811+
0)
812812
{
813813
throw std::runtime_error("Failed to load certificate " +
814814
policy.getCertPath());

0 commit comments

Comments
 (0)