Commit 95f855f8 authored by Peter Parente's avatar Peter Parente Committed by GitHub

Merge pull request #805 from parente/fix-openssl-regression

Generate missing openssl.cnf
parents a238993a 992d83c5
...@@ -67,3 +67,4 @@ dockerspawner.tar.gz ...@@ -67,3 +67,4 @@ dockerspawner.tar.gz
*.orig *.orig
.ipynb_checkpoints/ .ipynb_checkpoints/
.vscode/ .vscode/
.pytest_cache/
...@@ -26,6 +26,17 @@ if 'GEN_CERT' in os.environ: ...@@ -26,6 +26,17 @@ if 'GEN_CERT' in os.environ:
pass pass
else: else:
raise raise
# Generate an openssl.cnf file to set the distinguished name
cnf_file = os.path.join(os.getenv('CONDA_DIR', '/usr/lib'), 'ssl', 'openssl.cnf')
if not os.path.isfile(cnf_file):
with open(cnf_file, 'w') as fh:
fh.write('''\
[req]
distinguished_name = req_distinguished_name
[req_distinguished_name]
''')
# Generate a certificate if one doesn't exist on disk # Generate a certificate if one doesn't exist on disk
subprocess.check_call(['openssl', 'req', '-new', subprocess.check_call(['openssl', 'req', '-new',
'-newkey', 'rsa:2048', '-newkey', 'rsa:2048',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment