Mercurial > hg > orthanc
changeset 5599:3487684fd331
merge
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Tue, 07 May 2024 19:20:52 +0200 |
parents | 317850cd46bc (diff) f84301e077cf (current diff) |
children | aafe402ec950 b2a97dfd719f |
files | |
diffstat | 4 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Tue May 07 13:59:14 2024 +0200 +++ b/NEWS Tue May 07 19:20:52 2024 +0200 @@ -16,6 +16,12 @@ * Removed potential PHI from the logs when Orthanc encounters an error while creating a zip file. +Bug Fixes +--------- + +* When working with "DicomTlsEnabled": true and "DicomTlsRemoteCertificateRequired": false, + Orthanc was refusing to start if no "DicomTlsTrustedCertificates" was provided. + REST API --------
--- a/OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.cpp Tue May 07 13:59:14 2024 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.cpp Tue May 07 19:20:52 2024 +0200 @@ -76,7 +76,7 @@ throw OrthancException(ErrorCode_ParameterOutOfRange, "Unknown role"); } - if (!SystemToolbox::IsRegularFile(trustedCertificatesPath)) + if (requireRemoteCertificate && !SystemToolbox::IsRegularFile(trustedCertificatesPath)) { throw OrthancException(ErrorCode_InexistentFile, "Cannot read file with trusted certificates for DICOM TLS: " + trustedCertificatesPath); @@ -120,7 +120,7 @@ new DcmTLSTransportLayer(tmpRole /*opt_networkRole*/, NULL /*opt_readSeedFile*/, OFFalse /*initializeOpenSSL, done by Orthanc::Toolbox::InitializeOpenSsl()*/)); - if (IsFailure(tls->addTrustedCertificateFile(trustedCertificatesPath.c_str(), DCF_Filetype_PEM /*opt_keyFileFormat*/))) + if (requireRemoteCertificate && IsFailure(tls->addTrustedCertificateFile(trustedCertificatesPath.c_str(), DCF_Filetype_PEM /*opt_keyFileFormat*/))) { throw OrthancException(ErrorCode_BadFileFormat, "Cannot parse PEM file with trusted certificates for DICOM TLS: " + trustedCertificatesPath);
--- a/OrthancFramework/Sources/HttpServer/HttpOutput.cpp Tue May 07 13:59:14 2024 +0200 +++ b/OrthancFramework/Sources/HttpServer/HttpOutput.cpp Tue May 07 19:20:52 2024 +0200 @@ -428,8 +428,13 @@ void HttpOutput::Redirect(const std::string& path) { + /** + * "HttpStatus_301_MovedPermanently" was used in Orthanc <= + * 1.12.3. This caused issues on changes in the configuration of + * Orthanc. + **/ stateMachine_.ClearHeaders(); - stateMachine_.SetHttpStatus(HttpStatus_301_MovedPermanently); + stateMachine_.SetHttpStatus(HttpStatus_307_TemporaryRedirect); stateMachine_.AddHeader("Location", path); stateMachine_.SendBody(NULL, 0); }
--- a/OrthancFramework/Sources/Logging.h Tue May 07 13:59:14 2024 +0200 +++ b/OrthancFramework/Sources/Logging.h Tue May 07 19:20:52 2024 +0200 @@ -224,6 +224,7 @@ public: InternalLogger(LogLevel level, LogCategory category, + const char* pluginName /* ignored */, const char* file /* ignored */, int line /* ignored */) : level_(level), @@ -231,15 +232,6 @@ { } - // For backward binary compatibility with Orthanc Framework <= 1.8.0 - InternalLogger(LogLevel level, - const char* file /* ignored */, - int line /* ignored */) : - level_(level), - category_(LogCategory_GENERIC) - { - } - ~InternalLogger(); template <typename T>