From 52ce77f5bc499d9775b5b7a1fa1a918f9503cffe Mon Sep 17 00:00:00 2001 From: lberrymage Date: Thu, 9 Nov 2023 19:27:08 -0700 Subject: [PATCH] Fix fatal TLS handshake exception when publishing The Ktor HTTP client throws a fatal TLSException HandshakeFailure when connecting to the repository. Curiously this doesn't occur in our staging environment, but can easily be reproduced locally. The issue seems to find root in the CIO Ktor client's cipher support suite as indicated by issues with the same error such as [1]. Supposedly this issue was resolved, but others such as [2] indicate the issue is still present despite it being closed upstream. Without useful error information from the stack trace, the best option seems to be switching to another well-supported client engine such as Apache5. As a bonus, Apache5 also has HTTP/2 enabled by default. [1]: https://github.com/ktorio/ktor/issues/439 [2]: https://github.com/oliver-charlesworth/craft-watch/pull/198 --- console/build.gradle.kts | 2 +- gradle/verification-metadata.xml | 68 ++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/console/build.gradle.kts b/console/build.gradle.kts index 506c9450..3540f113 100644 --- a/console/build.gradle.kts +++ b/console/build.gradle.kts @@ -77,7 +77,7 @@ dependencies { implementation("cc.ekblad:4koma:$fourkomaVersion") implementation("io.insert-koin:koin-ktor:$koinVersion") implementation("io.insert-koin:koin-logger-slf4j:$koinVersion") - implementation("io.ktor:ktor-client-cio:$ktorVersion") + implementation("io.ktor:ktor-client-apache5:$ktorVersion") implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion") implementation("io.ktor:ktor-server-auth:$ktorVersion") implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion") diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index d751e481..d1cbd77f 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -889,6 +889,22 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + + + + + + + + + + @@ -1868,6 +1884,11 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + @@ -1984,6 +2005,11 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + @@ -2008,6 +2034,40 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2816,6 +2876,14 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + +