From 45c1fdbf3326ec82689ddd653a243af56a9310ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Guti=C3=A9rrez=20de=20Quevedo=20P=C3=A9?= =?UTF-8?q?rez?= Date: Mon, 8 Sep 2014 10:07:48 +0200 Subject: [PATCH] FIX: load a full certificate chain and not just the first one --- src/Socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Socket.cpp b/src/Socket.cpp index 549309e..615464a 100644 --- a/src/Socket.cpp +++ b/src/Socket.cpp @@ -59,7 +59,7 @@ Socket::Socket():fd(-1) if(!ssl_ctx_server) throw Exception(_("Error creating SSL context"),__FILE__,__LINE__); /* load certificate */ - if(SSL_CTX_use_certificate_file(ssl_ctx_server,cfg.getCertificateFile().c_str(),SSL_FILETYPE_PEM)==-1) + if(SSL_CTX_use_certificate_chain_file(ssl_ctx_server,cfg.getCertificateFile().c_str())==-1) throw Exception(_("Error loading certificate"),__FILE__,__LINE__); /* load private key */ if(SSL_CTX_use_PrivateKey_file(ssl_ctx_server,cfg.getPrivateKeyFile().c_str(),SSL_FILETYPE_PEM)==-1)