Skip to content

Commit f287f74

Browse files
committed
extra setupssl chg/mod-to-test
1 parent 00e9cc2 commit f287f74

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

irods/test/login_auth_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,9 @@ def test_ssl_with_server_verify_set_to_none_281(self):
511511
with helpers.file_backed_up(env_file):
512512
with open(env_file) as env_file_handle:
513513
env = json.load( env_file_handle )
514+
create_ssl_dir(ssl_dir='./some')
514515
env.update({
516+
#"irods_ssl_ca_certificate_file": "./some/irods.crt", # does not need to match server cert
515517
# "irods_client_server_negotiation": "request_server_negotiation",
516518
# "irods_client_server_policy": "CS_NEG_REQUIRE",
517519
# "irods_ssl_ca_certificate_file": "/path/to/some/file.crt", # does not need to exist

irods/test/setupssl.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ 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'):
28+
def create_ssl_dir(irods_key_path = 'irods.key', ssl_dir = ''):
29+
ssl_dir = ssl_dir or IRODS_SSL_DIR
2930
save_cwd = os.getcwd()
3031
silent_run = { 'shell': True, 'stderr' : PIPE, 'stdout' : PIPE }
3132
try:
32-
if not (os.path.exists(IRODS_SSL_DIR)):
33-
os.mkdir(IRODS_SSL_DIR)
34-
os.chdir(IRODS_SSL_DIR)
33+
if not (os.path.exists(ssl_dir)):
34+
os.mkdir(ssl_dir)
35+
os.chdir(ssl_dir)
3536
if not keep_old:
3637
Popen("openssl genrsa -out '{irods_key_path}' 2048 && chmod 600 '{irods_key_path}'".format(**locals()),
3738
**silent_run).communicate()

0 commit comments

Comments
 (0)