Skip to content

Commit

Permalink
FDP-1968: property directly mapped to object
Browse files Browse the repository at this point in the history
Signed-off-by: Loes Immens <[email protected]>
  • Loading branch information
loesimmens committed Sep 5, 2024
1 parent 1549b55 commit 50065cb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class IntegrationTestCoapClient {

@Value("\${config.psk.default-key}") private lateinit var defaultKey: String

@Value("\${config.coap.cipher-suites}") private lateinit var cipherSuites: List<String>
@Value("\${config.coap.cipher-suites}") private lateinit var cipherSuites: List<CipherSuite>

init {
DtlsConfig.register()
Expand Down Expand Up @@ -58,7 +58,7 @@ class IntegrationTestCoapClient {
.set(DtlsConfig.DTLS_ROLE, DtlsConfig.DtlsRole.CLIENT_ONLY)
.set(
DtlsConfig.DTLS_CIPHER_SUITES,
cipherSuites.map { name -> CipherSuite.getTypeByName(name) })
cipherSuites)
}

private fun getUri(): String =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CoapConfiguration(
listOf(TLS_PSK_WITH_AES_128_CBC_SHA256, TLS_PSK_WITH_AES_128_GCM_SHA256))
.set(
DtlsConfig.DTLS_CIPHER_SUITES,
coapProps.cipherSuites.map { name -> CipherSuite.getTypeByName(name) })
coapProps.cipherSuites)
.set(DtlsConfig.DTLS_CLIENT_AUTHENTICATION_MODE, CertificateAuthenticationMode.NONE)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: Apache-2.0
package org.gxf.standalonenotifyinggateway.coaphttpproxy.coap.configuration.properties

import org.eclipse.californium.scandium.dtls.cipher.CipherSuite
import java.time.Duration
import org.springframework.boot.context.properties.ConfigurationProperties

Expand All @@ -16,5 +17,5 @@ class CoapProperties(
val maxPeerInactivityPeriod: Duration,
val maxResourceBodySize: Int,
val preferredBlockSize: Int,
val cipherSuites: List<String>
val cipherSuites: List<CipherSuite>
)

0 comments on commit 50065cb

Please sign in to comment.