From 82b27ff5bccc925fe03d05f259cf881fafc8a1ce Mon Sep 17 00:00:00 2001 From: Piotr Jaszczyk Date: Fri, 15 Feb 2019 12:59:26 +0100 Subject: Use SDK/SSL in HV-VES Issue-ID: DCAEGEN2-1226 Change-Id: I7cfc09001f7315c1b6f4fcf150ad631630c810ef Signed-off-by: Piotr Jaszczyk --- sources/hv-collector-domain/pom.xml | 5 ++++- .../veshv/domain/SecurityConfiguration.kt | 23 ++-------------------- 2 files changed, 6 insertions(+), 22 deletions(-) (limited to 'sources/hv-collector-domain') diff --git a/sources/hv-collector-domain/pom.xml b/sources/hv-collector-domain/pom.xml index 4e01be3f..bac42a2f 100644 --- a/sources/hv-collector-domain/pom.xml +++ b/sources/hv-collector-domain/pom.xml @@ -74,11 +74,14 @@ io.projectreactor.netty reactor-netty + + org.onap.dcaegen2.services.sdk.security + ssl + io.arrow-kt arrow-core - org.assertj assertj-core diff --git a/sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/SecurityConfiguration.kt b/sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/SecurityConfiguration.kt index 7f566a6d..4bb0d848 100644 --- a/sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/SecurityConfiguration.kt +++ b/sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/SecurityConfiguration.kt @@ -20,7 +20,7 @@ package org.onap.dcae.collectors.veshv.domain import arrow.core.Option -import java.io.InputStream +import org.onap.dcaegen2.services.sdk.security.ssl.SecurityKeys import java.nio.file.Path /** @@ -28,23 +28,4 @@ import java.nio.file.Path * @since May 2018 */ data class SecurityConfiguration( - val sslDisable: Boolean = false, - val keys: Option) - -sealed class SslKeys - -data class OpenSslKeys(val privateKey: Path, - val cert: Path, - val trustedCert: Path) : SslKeys() - -data class JdkKeys(val keyStore: StreamProvider, - val keyStorePassword: CharArray, - val trustStore: StreamProvider, - val trustStorePassword: CharArray) : SslKeys() { - fun forgetPasswords() { - keyStorePassword.fill('x') - trustStorePassword.fill('x') - } -} - -typealias StreamProvider = () -> InputStream + val keys: Option) -- cgit 1.2.3-korg