Skip to content

Commit d01b8db

Browse files
committed
Update OpenSSL used in openssl3-prebuilt artefact to 3.5.0 (LTS)
Additionally remove testing of shared implementation with older openssl versions
1 parent 0a51432 commit d01b8db

File tree

5 files changed

+12
-53
lines changed

5 files changed

+12
-53
lines changed

build-logic/src/main/kotlin/ckbuild.use-openssl.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright (c) 2023-2025 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

55
import ckbuild.openssl.*
@@ -30,7 +30,5 @@ if (project == rootProject) {
3030
}
3131

3232
configureOpenssl("v3_0", "3.0.15", "3.0.15_1", service.v3_0)
33-
configureOpenssl("v3_1", "3.1.7", "3.1.7_1", service.v3_1)
34-
configureOpenssl("v3_2", "3.2.3", "3.2.3_1", service.v3_2)
35-
configureOpenssl("v3_3", "3.3.2", "3.3.2_1", service.v3_3)
33+
configureOpenssl("v3_5", "3.5.0", "3.5.0_1", service.v3_5)
3634
}

build-logic/src/main/kotlin/ckbuild/openssl/OpensslExtension.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright (c) 2023-2025 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

55
package ckbuild.openssl
@@ -13,17 +13,13 @@ import org.jetbrains.kotlin.konan.target.*
1313
@Suppress("PropertyName")
1414
abstract class OpensslService : BuildService<BuildServiceParameters.None> {
1515
abstract val v3_0: DirectoryProperty
16-
abstract val v3_1: DirectoryProperty
17-
abstract val v3_2: DirectoryProperty
18-
abstract val v3_3: DirectoryProperty
16+
abstract val v3_5: DirectoryProperty
1917
}
2018

2119
@Suppress("PropertyName")
2220
class OpensslExtension(service: Provider<OpensslService>) {
2321
val v3_0: OpensslXExtension = OpensslXExtension(service.flatMap { it.v3_0 })
24-
val v3_1: OpensslXExtension = OpensslXExtension(service.flatMap { it.v3_1 })
25-
val v3_2: OpensslXExtension = OpensslXExtension(service.flatMap { it.v3_2 })
26-
val v3_3: OpensslXExtension = OpensslXExtension(service.flatMap { it.v3_3 })
22+
val v3_5: OpensslXExtension = OpensslXExtension(service.flatMap { it.v3_5 })
2723
}
2824

2925
fun Task.uses(openssl: OpensslXExtension, block: OpensslXExtension.() -> Unit = {}) {

cryptography-providers/openssl3/prebuilt/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright (c) 2023-2025 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

55
import ckbuild.*
@@ -82,7 +82,7 @@ kotlin {
8282
}
8383

8484
tasks.withType<CInteropProcess>().configureEach {
85-
uses(openssl.v3_3) {
85+
uses(openssl.v3_5) {
8686
settings.extraOpts("-libraryPath", libDirectory(konanTarget).get().asFile.absolutePath)
8787
}
8888
}

cryptography-providers/openssl3/prebuilt/src/commonTest/kotlin/PrebuiltLibCrypto3Test.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright (c) 2023-2025 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

55
package dev.whyoleg.cryptography.providers.openssl3.prebuilt
@@ -13,10 +13,10 @@ class PrebuiltLibCrypto3Test : LibCrypto3Test() {
1313

1414
@Test
1515
fun testExactVersion() {
16-
assertEquals("3.3.2", OpenSSL_version(OPENSSL_VERSION_STRING)?.toKString())
16+
assertEquals("3.5.0", OpenSSL_version(OPENSSL_VERSION_STRING)?.toKString())
1717
assertEquals(3, OPENSSL_version_major().toInt())
18-
assertEquals(3, OPENSSL_version_minor().toInt())
19-
assertEquals(2, OPENSSL_version_patch().toInt())
18+
assertEquals(5, OPENSSL_version_minor().toInt())
19+
assertEquals(0, OPENSSL_version_patch().toInt())
2020
}
2121

2222
}

cryptography-providers/openssl3/shared/build.gradle.kts

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
/*
2-
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright (c) 2023-2025 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

55
import ckbuild.*
66
import ckbuild.openssl.*
77
import org.jetbrains.kotlin.gradle.*
8-
import org.jetbrains.kotlin.gradle.plugin.*
98
import org.jetbrains.kotlin.gradle.plugin.mpp.*
10-
import org.jetbrains.kotlin.gradle.targets.native.tasks.*
119
import org.jetbrains.kotlin.konan.target.*
1210

1311
plugins {
@@ -53,39 +51,6 @@ kotlin {
5351
linkTaskProvider.configure { uses(openssl.v3_0) }
5452
}
5553
}
56-
57-
targets.withType<KotlinNativeTargetWithTests<*>>().configureEach {
58-
fun createTestRuns(classifier: String, extension: OpensslXExtension) {
59-
fun createTestRun(name: String, buildType: NativeBuildType) {
60-
testRuns.create(name) {
61-
setExecutionSourceFrom(binaries.getTest(buildType))
62-
@Suppress("UNCHECKED_CAST")
63-
(this as ExecutionTaskHolder<KotlinNativeTest>).executionTask.configure {
64-
val providerTestsStep = providers.gradleProperty("ckbuild.providerTests.step").orNull
65-
onlyIf { providerTestsStep == null }
66-
uses(extension)
67-
when (konanTarget.family) {
68-
Family.OSX -> environment("DYLD_LIBRARY_PATH", extension.libDirectory(konanTarget).get().asFile.absolutePath)
69-
Family.LINUX -> environment("LD_LIBRARY_PATH", extension.libDirectory(konanTarget).get().asFile.absolutePath)
70-
Family.MINGW -> {
71-
val opensslBinPath = extension.binDirectory("windows-x64").get().asFile.absolutePath
72-
val currentPath = providers.environmentVariable("PATH").get()
73-
environment("PATH", "$opensslBinPath;$currentPath")
74-
}
75-
else -> error("not supported: $konanTarget")
76-
}
77-
}
78-
}
79-
}
80-
createTestRun("_${classifier}_Test", NativeBuildType.DEBUG)
81-
createTestRun("release_${classifier}_Test", NativeBuildType.RELEASE)
82-
}
83-
84-
createTestRuns("3_0", openssl.v3_0)
85-
createTestRuns("3_1", openssl.v3_1)
86-
createTestRuns("3_2", openssl.v3_2)
87-
createTestRuns("3_3", openssl.v3_3)
88-
}
8954
}
9055

9156
documentation {

0 commit comments

Comments
 (0)