Merge pull request #7334 from kevin-fwu/tls_load_chained_certs

Fix TLS certificate loading for chained certificates.
This commit is contained in:
Salvatore Sanfilippo 2020-05-31 14:32:56 +02:00 committed by GitHub
commit f644b112ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,7 +217,7 @@ int tlsConfigure(redisTLSContextConfig *ctx_config) {
SSL_CTX_set_ecdh_auto(ctx, 1);
#endif
if (SSL_CTX_use_certificate_file(ctx, ctx_config->cert_file, SSL_FILETYPE_PEM) <= 0) {
if (SSL_CTX_use_certificate_chain_file(ctx, ctx_config->cert_file) <= 0) {
ERR_error_string_n(ERR_get_error(), errbuf, sizeof(errbuf));
serverLog(LL_WARNING, "Failed to load certificate: %s: %s", ctx_config->cert_file, errbuf);
goto error;