diff options
author | kjaniak <kornel.janiak@nokia.com> | 2018-07-17 11:50:10 +0200 |
---|---|---|
committer | Piotr Jaszczyk <piotr.jaszczyk@nokia.com> | 2018-08-03 07:32:52 +0200 |
commit | 0d15767178ffff59009de51d3737883aa81df2a6 (patch) | |
tree | c1f8cc00ca873597a7e5014fc75e3db8b957a45d /hv-collector-xnf-simulator/src/main | |
parent | 40c5abeac588ca6c13477675960c94a97dcdeb15 (diff) |
Add command line option to disable SSL/TLS
Closes ONAP-508
Change-Id: If6c3935ede7b00dea9b36747c6cd1422c1c8d330
Signed-off-by: kjaniak <kornel.janiak@nokia.com>
Issue-ID: DCAEGEN2-601
Diffstat (limited to 'hv-collector-xnf-simulator/src/main')
-rw-r--r-- | hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgConfigurationProvider.kt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgConfigurationProvider.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgConfigurationProvider.kt index 04654f8c..96e65778 100644 --- a/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgConfigurationProvider.kt +++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/config/ArgConfigurationProvider.kt @@ -23,12 +23,7 @@ import org.apache.commons.cli.CommandLine import org.apache.commons.cli.DefaultParser import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration import org.onap.dcae.collectors.veshv.utils.commandline.ArgBasedConfiguration -import org.onap.dcae.collectors.veshv.utils.commandline.CommandLineOption.CERT_FILE -import org.onap.dcae.collectors.veshv.utils.commandline.CommandLineOption.MESSAGES_TO_SEND_AMOUNT -import org.onap.dcae.collectors.veshv.utils.commandline.CommandLineOption.PRIVATE_KEY_FILE -import org.onap.dcae.collectors.veshv.utils.commandline.CommandLineOption.TRUST_CERT_FILE -import org.onap.dcae.collectors.veshv.utils.commandline.CommandLineOption.VES_HV_HOST -import org.onap.dcae.collectors.veshv.utils.commandline.CommandLineOption.VES_HV_PORT +import org.onap.dcae.collectors.veshv.utils.commandline.CommandLineOption.* /** @@ -40,6 +35,7 @@ internal class ArgConfigurationProvider : ArgBasedConfiguration<SimulatorConfigu VES_HV_PORT, VES_HV_HOST, MESSAGES_TO_SEND_AMOUNT, + SSL_DISABLE, PRIVATE_KEY_FILE, CERT_FILE, TRUST_CERT_FILE @@ -57,10 +53,12 @@ internal class ArgConfigurationProvider : ArgBasedConfiguration<SimulatorConfigu } private fun parseSecurityConfig(cmdLine: CommandLine): SecurityConfiguration { + val sslDisable = cmdLine.hasOption(SSL_DISABLE) val pkFile = cmdLine.stringValue(PRIVATE_KEY_FILE, DefaultValues.PRIVATE_KEY_FILE) val certFile = cmdLine.stringValue(CERT_FILE, DefaultValues.CERT_FILE) val trustCertFile = cmdLine.stringValue(TRUST_CERT_FILE, DefaultValues.TRUST_CERT_FILE) return SecurityConfiguration( + sslDisable = sslDisable, privateKey = stringPathToPath(pkFile), cert = stringPathToPath(certFile), trustedCert = stringPathToPath(trustCertFile)) |