File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,14 +185,14 @@ def requires_cs_negotiation(self):
185185
186186 @staticmethod
187187 def make_ssl_context (irods_account ):
188- check_hostname = getattr (irods_account ,'ssl_verify_server' ,'hostname' )
188+ verify_server = getattr (irods_account ,'ssl_verify_server' ,'hostname' )
189189 CAfile = getattr (irods_account ,'ssl_ca_certificate_file' ,None )
190190 CApath = getattr (irods_account ,'ssl_ca_certificate_path' ,None )
191- verify = ssl .CERT_NONE if (None is CAfile is CApath ) else ssl .CERT_REQUIRED
191+ verify = ssl .CERT_NONE if (( None is CAfile is CApath ) or verify_server == 'none' ) else ssl .CERT_REQUIRED
192192 # See https://stackoverflow.com/questions/30461969/disable-default-certificate-verification-in-python-2-7-9/49040695#49040695
193193 ctx = ssl .create_default_context (ssl .Purpose .SERVER_AUTH , cafile = CAfile , capath = CApath )
194194 # Note: check_hostname must be assigned prior to verify_mode property or Python library complains!
195- ctx .check_hostname = (check_hostname .startswith ('host' ) and verify != ssl .CERT_NONE )
195+ ctx .check_hostname = (verify_server .startswith ('host' ) and verify != ssl .CERT_NONE )
196196 ctx .verify_mode = verify
197197 return ctx
198198
You can’t perform that action at this time.
0 commit comments