summaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-domain
diff options
context:
space:
mode:
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-02-15 12:59:26 +0100
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-02-19 12:51:46 +0100
commit82b27ff5bccc925fe03d05f259cf881fafc8a1ce (patch)
treed128931c70c19184d7b259d295ce39deeec370c3 /sources/hv-collector-domain
parentdc47bd1847a46fe0ad0ca6c10a4d61f829f4c0c6 (diff)
Use SDK/SSL in HV-VES
Issue-ID: DCAEGEN2-1226 Change-Id: I7cfc09001f7315c1b6f4fcf150ad631630c810ef Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'sources/hv-collector-domain')
-rw-r--r--sources/hv-collector-domain/pom.xml5
-rw-r--r--sources/hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/SecurityConfiguration.kt23
2 files changed, 6 insertions, 22 deletions
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
@@ -75,10 +75,13 @@
<artifactId>reactor-netty</artifactId>
</dependency>
<dependency>
+ <groupId>org.onap.dcaegen2.services.sdk.security</groupId>
+ <artifactId>ssl</artifactId>
+ </dependency>
+ <dependency>
<groupId>io.arrow-kt</groupId>
<artifactId>arrow-core</artifactId>
</dependency>
-
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
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<SslKeys>)
-
-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<SecurityKeys>)