aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-domain
diff options
context:
space:
mode:
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>)