comparison Tests/CheckDicomTls.py @ 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 08fac54c8555
children e769bcf2b94f
comparison
equal deleted inserted replaced
399:dd519677974d 400:f454fe86061b
98 'ExecuteLuaEnabled' : True, 98 'ExecuteLuaEnabled' : True,
99 'RemoteAccessAllowed' : True, 99 'RemoteAccessAllowed' : True,
100 'RegisteredUsers' : { 100 'RegisteredUsers' : {
101 'alice' : 'orthanctest' 101 'alice' : 'orthanctest'
102 }, 102 },
103 'DicomTlsRemoteCertificateRequired' : False, # New in Orthanc 1.9.3
103 })) 104 }))
104 105
105 exit(0) 106 exit(0)
106 107
107 108
200 'UseDicomTls' : True, 201 'UseDicomTls' : True,
201 }) 202 })
202 203
203 self.assertEqual(1, DoPost(ORTHANC, '/modalities/self/store', u) ['InstancesCount']) 204 self.assertEqual(1, DoPost(ORTHANC, '/modalities/self/store', u) ['InstancesCount'])
204 205
206
207 def test_anonymous(self):
208 # Fails on Orthanc <= 1.9.2
209 # https://book.orthanc-server.com/faq/dicom-tls.html#secure-tls-connections-without-certificate
210 subprocess.check_call([
211 FindExecutable('echoscu'),
212 ORTHANC['Server'],
213 str(ORTHANC['DicomPort']),
214 '-aec', 'ORTHANC',
215 '--anonymous-tls',
216 '+cf', 'dicom-tls-a.crt',
217 ], stderr = FNULL)
218
205 219
206 try: 220 try:
207 print('\nStarting the tests...') 221 print('\nStarting the tests...')
208 unittest.main(argv = [ sys.argv[0] ] + args.options) 222 unittest.main(argv = [ sys.argv[0] ] + args.options)
209 223