Skip to content

Commit

Permalink
Update patch versions of openssl used and update prebuilt openssl to …
Browse files Browse the repository at this point in the history
…3.3.2
  • Loading branch information
whyoleg committed Oct 11, 2024
1 parent 0ac9e89 commit 7c9e1df
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
7 changes: 4 additions & 3 deletions build-logic/src/main/kotlin/ckbuild.use-openssl.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ abstract class OpensslService : BuildService<BuildServiceParameters.None> {
abstract val v3_0: DirectoryProperty
abstract val v3_1: DirectoryProperty
abstract val v3_2: DirectoryProperty
abstract val v3_3: DirectoryProperty
}

@Suppress("PropertyName")
class OpensslExtension(service: Provider<OpensslService>) {
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 = {}) {
Expand Down
2 changes: 1 addition & 1 deletion cryptography-providers/openssl3/prebuilt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ kotlin {
}

tasks.withType<CInteropProcess>().configureEach {
uses(openssl.v3_2) {
uses(openssl.v3_3) {
settings.extraOpts("-libraryPath", libDirectory(konanTarget).get().asFile.absolutePath)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

}
1 change: 1 addition & 0 deletions cryptography-providers/openssl3/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/providers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7c9e1df

Please sign in to comment.