From ca5fd6c05d2aff60d115552078bdc53fbafc1fa1 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Thu, 10 Oct 2024 19:08:35 +0300 Subject: [PATCH] Update patch versions of openssl used and update prebuilt openssl to 3.3.2 --- build-logic/src/main/kotlin/ckbuild.use-openssl.gradle.kts | 7 ++++--- .../src/main/kotlin/ckbuild/openssl/OpensslExtension.kt | 2 ++ cryptography-providers/openssl3/prebuilt/build.gradle.kts | 2 +- .../src/commonTest/kotlin/PrebuiltLibCrypto3Test.kt | 6 +++--- cryptography-providers/openssl3/shared/build.gradle.kts | 1 + docs/providers/index.md | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/build-logic/src/main/kotlin/ckbuild.use-openssl.gradle.kts b/build-logic/src/main/kotlin/ckbuild.use-openssl.gradle.kts index 3ae4e189..369fdbbf 100644 --- a/build-logic/src/main/kotlin/ckbuild.use-openssl.gradle.kts +++ b/build-logic/src/main/kotlin/ckbuild.use-openssl.gradle.kts @@ -29,7 +29,8 @@ if (project == rootProject) { property.set(setupOpenssl.map { it.outputDirectory.get() }) } - configureOpenssl("v3_0", "3.0.12", "3.0.12_1", service.v3_0) - configureOpenssl("v3_1", "3.1.4", "3.1.4_1", service.v3_1) - configureOpenssl("v3_2", "3.2.0", "3.2.0_1", service.v3_2) + configureOpenssl("v3_0", "3.0.15", "3.0.15_1", service.v3_0) + configureOpenssl("v3_1", "3.1.7", "3.1.7_1", service.v3_1) + configureOpenssl("v3_2", "3.2.3", "3.2.3_1", service.v3_2) + configureOpenssl("v3_3", "3.3.2", "3.3.2_1", service.v3_3) } diff --git a/build-logic/src/main/kotlin/ckbuild/openssl/OpensslExtension.kt b/build-logic/src/main/kotlin/ckbuild/openssl/OpensslExtension.kt index 38d8b503..e598f04c 100644 --- a/build-logic/src/main/kotlin/ckbuild/openssl/OpensslExtension.kt +++ b/build-logic/src/main/kotlin/ckbuild/openssl/OpensslExtension.kt @@ -15,6 +15,7 @@ abstract class OpensslService : BuildService { abstract val v3_0: DirectoryProperty abstract val v3_1: DirectoryProperty abstract val v3_2: DirectoryProperty + abstract val v3_3: DirectoryProperty } @Suppress("PropertyName") @@ -22,6 +23,7 @@ class OpensslExtension(service: Provider) { val v3_0: OpensslXExtension = OpensslXExtension(service.flatMap { it.v3_0 }) val v3_1: OpensslXExtension = OpensslXExtension(service.flatMap { it.v3_1 }) val v3_2: OpensslXExtension = OpensslXExtension(service.flatMap { it.v3_2 }) + val v3_3: OpensslXExtension = OpensslXExtension(service.flatMap { it.v3_3 }) } fun Task.uses(openssl: OpensslXExtension, block: OpensslXExtension.() -> Unit = {}) { diff --git a/cryptography-providers/openssl3/prebuilt/build.gradle.kts b/cryptography-providers/openssl3/prebuilt/build.gradle.kts index 52efae58..baef5b2c 100644 --- a/cryptography-providers/openssl3/prebuilt/build.gradle.kts +++ b/cryptography-providers/openssl3/prebuilt/build.gradle.kts @@ -82,7 +82,7 @@ kotlin { } tasks.withType().configureEach { - uses(openssl.v3_2) { + uses(openssl.v3_3) { settings.extraOpts("-libraryPath", libDirectory(konanTarget).get().asFile.absolutePath) } } diff --git a/cryptography-providers/openssl3/prebuilt/src/commonTest/kotlin/PrebuiltLibCrypto3Test.kt b/cryptography-providers/openssl3/prebuilt/src/commonTest/kotlin/PrebuiltLibCrypto3Test.kt index fde11bd7..0f9c87a6 100644 --- a/cryptography-providers/openssl3/prebuilt/src/commonTest/kotlin/PrebuiltLibCrypto3Test.kt +++ b/cryptography-providers/openssl3/prebuilt/src/commonTest/kotlin/PrebuiltLibCrypto3Test.kt @@ -13,10 +13,10 @@ class PrebuiltLibCrypto3Test : LibCrypto3Test() { @Test fun testExactVersion() { - assertEquals("3.2.0", OpenSSL_version(OPENSSL_VERSION_STRING)?.toKString()) + assertEquals("3.3.2", OpenSSL_version(OPENSSL_VERSION_STRING)?.toKString()) assertEquals(3, OPENSSL_version_major().toInt()) - assertEquals(2, OPENSSL_version_minor().toInt()) - assertEquals(0, OPENSSL_version_patch().toInt()) + assertEquals(3, OPENSSL_version_minor().toInt()) + assertEquals(2, OPENSSL_version_patch().toInt()) } } diff --git a/cryptography-providers/openssl3/shared/build.gradle.kts b/cryptography-providers/openssl3/shared/build.gradle.kts index bc973d7c..d82633f8 100644 --- a/cryptography-providers/openssl3/shared/build.gradle.kts +++ b/cryptography-providers/openssl3/shared/build.gradle.kts @@ -84,6 +84,7 @@ kotlin { createTestRuns("3_0", openssl.v3_0) createTestRuns("3_1", openssl.v3_1) createTestRuns("3_2", openssl.v3_2) + createTestRuns("3_3", openssl.v3_3) } } diff --git a/docs/providers/index.md b/docs/providers/index.md index 61785476..6e73b052 100644 --- a/docs/providers/index.md +++ b/docs/providers/index.md @@ -9,7 +9,7 @@ On current moment following providers are available out of the box: * [Apple](../modules/cryptography-provider-apple.md) - via [CommonCrypto](https://developer.apple.com/library/archive/documentation/Security/Conceptual/cryptoservices/Introduction/Introduction.html) * [OpenSSL3](../modules/cryptography-provider-openssl3.md) - via [OpenSSL 3.x](https://www.openssl.org), - statically linked to prebuilt OpenSSL 3.0.8 or dynamically linked (experimental) + statically linked to prebuilt OpenSSL 3.3.2 or dynamically linked (experimental) ## Supported primitives