bincimap

Log | Files | Refs | LICENSE

commit 26182f39e8f215fa97633b3b347ba916977612bf
parent 88b8e487d8984a37e99980b48f4779a0918fa4b0
Author: Dominik Schmidt <dominik@schm1dt.ch>
Date:   Mon, 25 Jan 2021 21:09:54 +0100

Use a more standard approach at SSL handling

This fixes a "cannot get local issuer certificate" bug on my system.

Diffstat:
Msrc/io-ssl.cc | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/io-ssl.cc b/src/io-ssl.cc @@ -113,7 +113,7 @@ bool SSLEnabledIO::setModeSSL(void) string pemname = session.globalconfig["SSL"]["pem file"]; if (pemname == "") pemname = "/usr/share/ssl/certs/stunnel.pem"; - if (!SSL_CTX_use_certificate_file(ctx, pemname.c_str(), SSL_FILETYPE_PEM)) { + if (!SSL_CTX_use_certificate_chain_file(ctx, pemname.c_str())) { setLastError("SSL error: unable to use certificate in PEM file: " + pemname + ": " + string(ERR_error_string(ERR_get_error(), 0)));