New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CIO server HTTPS support on Native #2942
base: main
Are you sure you want to change the base?
Conversation
TODO: test failed - HttpServerCommonTestSuite.testProxyHeaders
* new API to add SSL connector * run CIO server SSL tests on linux * migrate current JVM engines to support both old and new SSL configuration
if (result.status == SSLEngineResult.Status.CLOSED) break@loop | ||
} | ||
} | ||
} catch (cause: Throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TooGenericExceptionCaught: Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
(at-me in a reply with help
or ignore
)
if (unwrapDestination !== initialUnwrapDestination) updateUnwrapDestination(unwrapDestination) | ||
resumeUnwrapContinuation(result) | ||
return result | ||
} catch (cause: Throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TooGenericExceptionCaught: Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
(at-me in a reply with help
or ignore
)
} | ||
|
||
return result | ||
} catch (cause: Throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TooGenericExceptionCaught: Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
(at-me in a reply with help
or ignore
)
"Failed to parse PKCS12 file" | ||
} | ||
return PKCS12Certificate(privateKey.value!!, x509Certificate.value!!) | ||
} catch (cause: Throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TooGenericExceptionCaught: Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
(at-me in a reply with help
or ignore
)
} | ||
//println("[$debugString] WRITING STEP RESULT: $result") | ||
} while (result > 0) | ||
} catch (cause: Throwable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TooGenericExceptionCaught: Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
(at-me in a reply with help
or ignore
)
connectionIdleTimeoutSeconds = connectionIdleTimeoutSeconds | ||
) | ||
internal actual fun TLSConfigBuilder.takeFromConnector(connectorConfig: EngineSSLConnectorConfig) { | ||
connectorConfig.authentication?.let { config -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a?b.let { b -> b?.clet { c -> ... }
is hard to read. Could be replaced with:
val c = a?.b?.c
instead
keyAlias: String, | ||
keyStorePassword: () -> CharArray, | ||
privateKeyPassword: () -> CharArray | ||
) : this() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also can make this constructor primary(with all val
parameters) and make the actual constructor secondary
Based on: #2939
Subsystem
Server, CIO
Motivation
Fixes https://youtrack.jetbrains.com/issue/KTOR-694 for native
Solution
ktor-network-tls
)TODO:
EngineTestBase
to test also for it