Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed DTLS 1.0 from client and server * added more ciphers * updated cipher list based on Mozilla SSL configurator * Make dtls cipher suites configurable. * Use cipher suites from config. * squash: Remove unused imports. * Require non-empty cipher suites. * squash: Fix ktlint. * Fix typo. * Better exception * commented out AES 256 ciphers, because they are not supported yet * exit early on mis-configured dtls ciphers * don't restart after configuration error Co-authored-by: Boris Grozev <boris@jitsi.org>
- Loading branch information
1 parent
ad606ca
commit 0aa0b1f
Showing
8 changed files
with
148 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
jitsi-media-transform/src/test/kotlin/org/jitsi/nlj/KotestProjectConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright @ 2022 - present 8x8, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.jitsi.nlj | ||
|
||
import io.kotest.core.config.AbstractProjectConfig | ||
import org.jitsi.metaconfig.MetaconfigSettings | ||
|
||
class KotestProjectConfig : AbstractProjectConfig() { | ||
override fun beforeAll() = super.beforeAll().also { | ||
// The only purpose of config caching is performance. We always want caching disabled in tests (so we can | ||
// freely modify the config without affecting other tests executing afterwards). | ||
MetaconfigSettings.cacheEnabled = false | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
jitsi-media-transform/src/test/kotlin/org/jitsi/nlj/dtls/DtlsConfigTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright @ 2023 - present 8x8, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.jitsi.nlj.dtls | ||
|
||
import io.kotest.assertions.throwables.shouldThrow | ||
import io.kotest.core.spec.style.ShouldSpec | ||
import io.kotest.matchers.shouldBe | ||
import org.bouncycastle.tls.CipherSuite | ||
import org.jitsi.config.withNewConfig | ||
import org.jitsi.metaconfig.ConfigException | ||
|
||
class DtlsConfigTest : ShouldSpec() { | ||
init { | ||
context("Valid cipher suites") { | ||
withNewConfig( | ||
""" | ||
jmt.dtls.cipher-suites = [ | ||
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, | ||
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, | ||
] | ||
""".trimIndent() | ||
) { | ||
DtlsConfig.config.cipherSuites shouldBe listOf( | ||
CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, | ||
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, | ||
) | ||
} | ||
} | ||
context("Invalid cipher suites") { | ||
context("Invalid name") { | ||
withNewConfig( | ||
""" | ||
jmt.dtls.cipher-suites = [ | ||
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, | ||
invalid | ||
] | ||
""".trimIndent() | ||
) { | ||
shouldThrow<ConfigException> { DtlsConfig.config.cipherSuites } | ||
} | ||
} | ||
|
||
context("Empty") { | ||
withNewConfig("jmt.dtls.cipher-suites = []") { | ||
shouldThrow<ConfigException> { DtlsConfig.config.cipherSuites } | ||
} | ||
} | ||
context("Wrong type") { | ||
withNewConfig("jmt.dtls.cipher-suites = 42") { | ||
shouldThrow<ConfigException> { DtlsConfig.config.cipherSuites } | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters