https://kotlinlang.org logo
#ktor
Title
# ktor
s

sannysoft

02/28/2019, 9:17 AM
Hello. Does ktor has server socket TLS implementation?
c

cy

02/28/2019, 9:18 AM
No, not yet. TLS was implemented for client to get ktor-client working. It is not prioritized for server since all engines except experimental CIO do support TLS out of the box.
s

sannysoft

02/28/2019, 9:26 AM
I’m creating a proxy-server with ktor and it would be great to have TLS server socket
And another thing I am missing - TLS classes all all internal and I need to make a client handshake for already opened channels - there is probably no way to do that
c

cy

02/28/2019, 9:28 AM
It is not that hard to write a server-side part since we already have a lot of implemented things for client.
You don't need these internals, just open tls over a regular socket
socket.tls(....)
tls
extension on a socket is public
s

sannysoft

02/28/2019, 9:30 AM
It opens channels inside the function - but my channels are open already at the moment of handshake
c

cy

02/28/2019, 9:31 AM
Well, for now you can only use
copyTo
For sure we are not going to open internals, perhaps we need to improve
tls
extension function
Could you please file a ticket about it?
s

sannysoft

02/28/2019, 9:32 AM
It would be great if it accepts input and output channels
Sure, I will. At Github?
c

cy

02/28/2019, 9:33 AM
s

sannysoft

02/28/2019, 9:35 AM
Thanks a lot!
11 Views