Skip to content

Commit 8109fec

Browse files
committed
Revert "popping cert spec for now"
This reverts commit 40db2e2.
1 parent aafbe28 commit 8109fec

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

irods/connection.py

-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ def ssl_startup(self):
209209
try:
210210
context = self.account.ssl_context
211211
except AttributeError:
212-
# TODO - if verify explicitly none, then try to ignore certificate_(file|path) even if given (reopen #281 ?)
213212
self.account.ssl_context = context = self.make_ssl_context(self.account)
214213

215214
# Wrap socket with context

irods/test/login_auth_test.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from re import compile as regex
2525
import gc
2626
import six
27-
from irods.test.setupssl import create_ssl_dir
2827

2928
#
3029
# Allow override to specify the PAM password in effect for the test rodsuser.
@@ -512,12 +511,16 @@ def test_ssl_with_server_verify_set_to_none_281(self):
512511
with helpers.file_backed_up(env_file):
513512
with open(env_file) as env_file_handle:
514513
env = json.load( env_file_handle )
515-
create_ssl_dir(ssl_dir='./some')
516514
env.update({
517-
#"irods_ssl_ca_certificate_file": "./some/irods.crt", # does not need to match server cert
515+
# "irods_client_server_negotiation": "request_server_negotiation",
516+
# "irods_client_server_policy": "CS_NEG_REQUIRE",
517+
# "irods_ssl_ca_certificate_file": "/path/to/some/file.crt", # does not need to exist
518518
"irods_ssl_verify_server": "none",
519+
# "irods_encryption_key_size": 32,
520+
# "irods_encryption_salt_size": 8,
521+
# "irods_encryption_num_hash_rounds": 16,
522+
# "irods_encryption_algorithm": "AES-256-CBC"
519523
})
520-
print('popping cert file path-->{}'.format(env.pop('irods_ssl_ca_certificate_file',None)))
521524
with open(env_file,'w') as f:
522525
json.dump(env,f)
523526
with helpers.make_session() as session:

irods/test/setupssl.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ def create_server_cert(process_output = sys.stdout, irods_key_path = 'irods.key'
2525
p.wait()
2626
return p.returncode
2727

28-
def create_ssl_dir(irods_key_path = 'irods.key', ssl_dir = ''):
29-
ssl_dir = ssl_dir or IRODS_SSL_DIR
28+
def create_ssl_dir(irods_key_path = 'irods.key'):
3029
save_cwd = os.getcwd()
3130
silent_run = { 'shell': True, 'stderr' : PIPE, 'stdout' : PIPE }
3231
try:
33-
if not (os.path.exists(ssl_dir)):
34-
os.mkdir(ssl_dir)
35-
os.chdir(ssl_dir)
32+
if not (os.path.exists(IRODS_SSL_DIR)):
33+
os.mkdir(IRODS_SSL_DIR)
34+
os.chdir(IRODS_SSL_DIR)
3635
if not keep_old:
3736
Popen("openssl genrsa -out '{irods_key_path}' 2048 && chmod 600 '{irods_key_path}'".format(**locals()),
3837
**silent_run).communicate()

0 commit comments

Comments
 (0)