Adds configuration injection to the openssl conf #26

Merged
merged 2 commits into from Apr 27, 2016

Conversation

Projects
None yet
2 participants
Contributor

chuckbutler commented Apr 27, 2016

to allow CSR's to carry extensions into their signed certificate.

Adds configuration injection to the openssl conf
to allow CSR's to carry extensions into their signed certificate.
reactive/tls.py
+ conf = f.readlines()
+ for idx,line in enumerate(conf):
+ if '[ CA_default ]' in line:
+ conf.insert(idx + 1, "copy_extensions = copy")
@mbruzek

mbruzek Apr 27, 2016

Contributor

This isn't idempotent, if this method runs multiple times we could get multiple copy_extension directives. Can you check for the string in conf first and if not do the for loop?

if 'copy_extensions = copy' not in conf:
    for idx,line in enumerate(conf):
Contributor

mbruzek commented Apr 27, 2016

+1 LGTM

@mbruzek mbruzek merged commit 447979a into juju-solutions:master Apr 27, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment