You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Conscrypt support for SocketChannel instead of standard java.io.Socket #970
Repro'd a bug that seems to be JSSE or Conscrypt with SocketChannel sockets. It fails with both, so could be lower (JVM) or higher (OkHttp) in the stack.
#971 mostly addresses this by ensuring we do all the tests in ConscryptSocketTest over SocketChannels to (both client and server side) and adds a test which sends actual data. The CI runs against various openjdk versions so let's see if it reproduces your issue.
This test doesn't run on Android (because reasons), we'll need to add something for that case too.
Activity
prbprbprb commentedon Feb 9, 2021
It ought to work, and if it doesn't then we should fix it (so yes, supported).
In theory you can layer a
ConscryptEngineSocket[1] over any workingSocket, including one which is itself layered over aSocketChannel. However it doesn't look like we have any test coverage for that case, but should be straightforward to add it to https://github.com/google/conscrypt/blob/master/openjdk/src/test/java/org/conscrypt/ConscryptSocketTest.java[1]
ConscryptFileDescriptorSocketcan't do TLS over TLS because reasons.Extend ConscryptSocketTest to cover SocketChannels.
prbprbprb commentedon Feb 11, 2021
#971 mostly addresses this by ensuring we do all the tests in ConscryptSocketTest over SocketChannels to (both client and server side) and adds a test which sends actual data. The CI runs against various openjdk versions so let's see if it reproduces your issue.
This test doesn't run on Android (because reasons), we'll need to add something for that case too.
yschimke commentedon Feb 11, 2021
FWIW I think ive found two issues.
1 - the automatic SNIHostName in ssl params doesnt work. This was Java 8+ for regular sockets but seems broken for socketchannel
2 - there is a deadlock i'm hitting with with h2. Likely because its a non typical IO workload
Http 1.1 - write request. Then read response.
General - two half duplex streams
Http 2 - two streams with app level dependencies
prbprbprb commentedon Feb 12, 2021
Do you have a repro for either of those?
yschimke commentedon Feb 12, 2021
Let me restate my previous comment.
"FWIW I think i've found two issues under JSSE.", My repro with JSSE currently using JUL logging which is very clear that SNI isn't being set.
But the repro for Conscrypt is just that it's blocking during the request then timing out.
yschimke commentedon Feb 12, 2021
The first problem with SNIHostName turns out to be that you can't use SNI with localhost! So I've switched to a fake "local.host"
https://tools.ietf.org/html/rfc6066#page-6 specifies a FQDN is required.
yschimke commentedon Feb 13, 2021
Second looks to be a 3 thread deadlock between OkHttp and Channels.
Thanks for adding the test.
yschimke commentedon Feb 13, 2021
Known limitation of channels lysine-dev/okhttp#6558
Extend ConscryptSocketTest to cover SocketChannels. (#971)