Mercurial > hg > orthanc
diff OrthancFramework/Sources/DicomNetworking/DicomServer.cpp @ 4656:82a314325351
New configuration option: "DicomTlsRemoteCertificateRequired"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 06 May 2021 18:39:19 +0200 |
parents | fe7c2be5bce2 |
children | fc2ba1ce6538 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomNetworking/DicomServer.cpp Thu May 06 16:54:46 2021 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/DicomServer.cpp Thu May 06 18:39:19 2021 +0200 @@ -102,7 +102,8 @@ storageCommitmentFactory_(NULL), applicationEntityFilter_(NULL), useDicomTls_(false), - maximumPduLength_(ASC_DEFAULTMAXPDU) + maximumPduLength_(ASC_DEFAULTMAXPDU), + remoteCertificateRequired_(true) { } @@ -404,8 +405,9 @@ try { - pimpl_->tls_.reset(Internals::InitializeDicomTls(pimpl_->network_, NET_ACCEPTOR, ownPrivateKeyPath_, - ownCertificatePath_, trustedCertificatesPath_)); + pimpl_->tls_.reset(Internals::InitializeDicomTls( + pimpl_->network_, NET_ACCEPTOR, ownPrivateKeyPath_, ownCertificatePath_, + trustedCertificatesPath_, remoteCertificateRequired_)); } catch (OrthancException&) { @@ -575,4 +577,15 @@ Stop(); maximumPduLength_ = pdu; } + + void DicomServer::SetRemoteCertificateRequired(bool required) + { + Stop(); + remoteCertificateRequired_ = required; + } + + bool DicomServer::IsRemoteCertificateRequired() const + { + return remoteCertificateRequired_; + } }