Skip to content
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

Http client TLS SNI extension support, api for setting ciphersuites #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

avrecko
Copy link
Contributor

@avrecko avrecko commented Dec 28, 2024

Http client fails to handshake when connecting to https server that is doing virtual hosts. So just added SNI TLS extension when handshaking SSL_set_tlsext_host_name. This way the server knows which host to serve. Exception in question:

javax.net.ssl.SSLException: error:0A000410:SSL routines::ssl/tls alert handshake failure
    at one.nio.pool.SocketPool.createObject(SocketPool.java:186)
    at one.nio.pool.SocketPool.createObject(SocketPool.java:26)
    at one.nio.pool.Pool.borrowObject(Pool.java:93)
    at one.nio.http.HttpClient.invoke(HttpClient.java:90)
    at one.nio.http.HttpClient.invoke(HttpClient.java:82)
    at one.nio.http.HttpClient.get(HttpClient.java:121)
    at nl.digitalekabeltelevisie.util.Foo.main(Foo.java:18)
Caused by: javax.net.ssl.SSLException: error:0A000410:SSL routines::ssl/tls alert handshake failure
    at one.nio.net.NativeSslSocket.handshake(Native Method)
    at one.nio.pool.SocketPool.createObject(SocketPool.java:180)
    ... 6 more

Also added API support for calling SSL_CTX_set_ciphersuites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant