Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SpectrumIM/spectrum2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Takmazov <vitalyster@gmail.com>2021-12-26 08:38:25 +0300
committerVitaly Takmazov <vitalyster@gmail.com>2021-12-26 08:38:25 +0300
commit085849fde01e8b2d78a43315e590616e5b7d3ab6 (patch)
tree670d3b831349fb7066bd34e81a10777c131c7903 /include
parent8ab590f673c05f5ce0720768d60eba2089c5304a (diff)
Add all certificates from p12 file when using OpenSSL SSL backend
Fixes #280
Diffstat (limited to 'include')
-rw-r--r--include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp b/include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp
index 2f22a280..b0628fb0 100644
--- a/include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp
+++ b/include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp
@@ -219,6 +219,9 @@ bool OpenSSLServerContext::setServerCertificate(CertificateWithKey::ref certref)
LOG4CXX_ERROR(logger, "TLS WILL NOT WORK: Can't use this private key");
return false;
}
+ for (int i = 0; i < sk_X509_num(caCerts.get()); ++i) {
+ SSL_CTX_add_extra_chain_cert(context_, sk_X509_value(caCerts.get(), i));
+ }
return true;
}