comparison OrthancFramework/Sources/DicomNetworking/DicomServer.cpp @ 5643:b1a18218860c

2 new configurations: DicomTlsMinimumProtocolVersion + DicomTlsCiphersAccepted
author Alain Mazy <am@orthanc.team>
date Fri, 31 May 2024 16:56:35 +0200
parents f7adfb22e20e
children 9d27024a431f
comparison
equal deleted inserted replaced
5642:95e282478cda 5643:b1a18218860c
409 409
410 try 410 try
411 { 411 {
412 pimpl_->tls_.reset(Internals::InitializeDicomTls( 412 pimpl_->tls_.reset(Internals::InitializeDicomTls(
413 pimpl_->network_, NET_ACCEPTOR, ownPrivateKeyPath_, ownCertificatePath_, 413 pimpl_->network_, NET_ACCEPTOR, ownPrivateKeyPath_, ownCertificatePath_,
414 trustedCertificatesPath_, remoteCertificateRequired_)); 414 trustedCertificatesPath_, remoteCertificateRequired_, minimumTlsVersion_, acceptedCiphers_));
415 } 415 }
416 catch (OrthancException&) 416 catch (OrthancException&)
417 { 417 {
418 ASC_dropNetwork(&pimpl_->network_); 418 ASC_dropNetwork(&pimpl_->network_);
419 throw; 419 throw;
492 bool DicomServer::IsDicomTlsEnabled() const 492 bool DicomServer::IsDicomTlsEnabled() const
493 { 493 {
494 return useDicomTls_; 494 return useDicomTls_;
495 } 495 }
496 496
497 void DicomServer::SetMinimumTlsVersion(unsigned int version)
498 {
499 minimumTlsVersion_ = version;
500 DicomAssociationParameters::SetMinimumTlsVersion(version);
501 }
502
503 void DicomServer::SetAcceptedCiphers(const std::set<std::string>& ciphers)
504 {
505 acceptedCiphers_ = ciphers;
506 DicomAssociationParameters::SetAcceptedCiphers(ciphers);
507 }
508
497 void DicomServer::SetOwnCertificatePath(const std::string& privateKeyPath, 509 void DicomServer::SetOwnCertificatePath(const std::string& privateKeyPath,
498 const std::string& certificatePath) 510 const std::string& certificatePath)
499 { 511 {
500 Stop(); 512 Stop();
501 513