changeset 5601:aafe402ec950 find-refactoring

integration mainline->find-refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 07 May 2024 21:24:46 +0200
parents 8796c100aaf8 (current diff) 3487684fd331 (diff)
children e4e7ca3d206e
files NEWS
diffstat 5 files changed, 17 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Tue May 07 21:23:34 2024 +0200
+++ b/NEWS	Tue May 07 21:24:46 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 21:23:34 2024 +0200
+++ b/OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.cpp	Tue May 07 21:24:46 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 21:23:34 2024 +0200
+++ b/OrthancFramework/Sources/HttpServer/HttpOutput.cpp	Tue May 07 21:24:46 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 21:23:34 2024 +0200
+++ b/OrthancFramework/Sources/Logging.h	Tue May 07 21:24:46 2024 +0200
@@ -28,6 +28,7 @@
 #include "Compatibility.h"
 
 #include <iostream>
+#include <stdint.h>
 
 #if !defined(ORTHANC_ENABLE_LOGGING)
 #  error The macro ORTHANC_ENABLE_LOGGING must be defined
@@ -223,6 +224,7 @@
     public:
       InternalLogger(LogLevel level,
                      LogCategory category,
+                     const char* pluginName /* ignored */,
                      const char* file  /* ignored */,
                      int line  /* ignored */) :
         level_(level),
@@ -230,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>
--- a/TODO	Tue May 07 21:23:34 2024 +0200
+++ b/TODO	Tue May 07 21:24:46 2024 +0200
@@ -126,6 +126,7 @@
   https://groups.google.com/g/orthanc-users/c/o15Dekecgds/m/xmPE2y3bAwAJ
 * Support Palette PNG in /tools/create-dicom:
   https://discourse.orthanc-server.org/t/404-on-tools-create-dicom-endpoint-with-specific-png/3562
+* Support creation of DICOM files from MP4 in /tools/create-dicom
 * (1) In the /studies/{id}/anonymize route, add an option to remove
   secondary captures.  They usually contains Patient info in the
   image. The SOPClassUID might be used to identify such secondary