Skip to content
Snippets Groups Projects
Commit 2452999e authored by Hans Trompert's avatar Hans Trompert
Browse files

additional logging of wich TLS mode is being used

parent ec39a1d7
Branches
No related tags found
No related merge requests found
......@@ -100,6 +100,7 @@ def setupBackend(backend_cfg, network_name, nrm_ports, parent_requester):
def setupTLSContext(vc):
# ssl/tls contxt
if vc[config.TLS]:
log.message('setup for full client/server TLS mode')
from opennsa.opennsaTlsContext import opennsa2WayTlsContext
ctx_factory = opennsa2WayTlsContext(
vc[config.KEY], vc[config.CERTIFICATE], vc[config.CERTIFICATE_DIR], vc[config.VERIFY_CERT])
......@@ -110,11 +111,13 @@ def setupTLSContext(vc):
'certdir value {} is not a directory'.format(vc[config.CERTIFICATE_DIR]))
if vc[config.KEY] and vc[config.CERTIFICATE]:
# enable client authentication even when not in TLS mode
log.message('setup for client TLS mode with client authentication')
from opennsa.opennsaTlsContext import opennsa2WayTlsContext
ctx_factory = opennsa2WayTlsContext(
vc[config.KEY], vc[config.CERTIFICATE], vc[config.CERTIFICATE_DIR], vc[config.VERIFY_CERT])
else:
from opennsa.opennsaTlsContext import opennsaTlsContext
log.message('setup for client TLS mode without client authentication')
ctx_factory = opennsaTlsContext(
vc[config.CERTIFICATE_DIR], vc[config.VERIFY_CERT])
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment