Mercurial > hg > orthanc
diff OrthancServer/Sources/main.cpp @ 4190:9ce5c89328f5
New configuration options to enable HTTP peers identification through certificates
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Tue, 15 Sep 2020 15:47:28 +0200 |
parents | 1c9c2c41c015 |
children | d962a2996637 |
line wrap: on
line diff
--- a/OrthancServer/Sources/main.cpp Tue Sep 15 08:27:17 2020 +0200 +++ b/OrthancServer/Sources/main.cpp Tue Sep 15 15:47:28 2020 +0200 @@ -1017,6 +1017,18 @@ httpServer.SetSslEnabled(false); } + if (lock.GetConfiguration().GetBooleanParameter("SslVerifyPeers", false)) + { + std::string trustedClientCertificates = lock.GetConfiguration().InterpretStringParameterAsPath( + lock.GetConfiguration().GetStringParameter("SslTrustedClientCertificates", "trustedCertificates.pem")); + httpServer.SetSslVerifyPeers(true); + httpServer.SetSslTrustedClientCertificates(trustedClientCertificates.c_str()); + } + else + { + httpServer.SetSslVerifyPeers(false); + } + if (lock.GetConfiguration().GetBooleanParameter("ExecuteLuaEnabled", false)) { context.SetExecuteLuaEnabled(true);