changeset 400:f454fe86061b Orthanc-1.9.3

dicom tls: test_anonymous
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 May 2021 09:03:05 +0200
parents dd519677974d
children 90a088ff2187
files Tests/CheckDicomTls.py
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/CheckDicomTls.py	Thu May 06 16:53:08 2021 +0200
+++ b/Tests/CheckDicomTls.py	Fri May 07 09:03:05 2021 +0200
@@ -100,6 +100,7 @@
             'RegisteredUsers' : {
                 'alice' : 'orthanctest'
             },
+            'DicomTlsRemoteCertificateRequired' : False,  # New in Orthanc 1.9.3
         }))
 
     exit(0)
@@ -202,6 +203,19 @@
 
         self.assertEqual(1, DoPost(ORTHANC, '/modalities/self/store', u) ['InstancesCount'])
         
+
+    def test_anonymous(self):
+        # Fails on Orthanc <= 1.9.2
+        # https://book.orthanc-server.com/faq/dicom-tls.html#secure-tls-connections-without-certificate
+        subprocess.check_call([
+            FindExecutable('echoscu'),
+            ORTHANC['Server'], 
+            str(ORTHANC['DicomPort']),
+            '-aec', 'ORTHANC',
+            '--anonymous-tls',
+            '+cf', 'dicom-tls-a.crt',
+        ], stderr = FNULL)
+        
         
 try:
     print('\nStarting the tests...')