Engine socket fails for createSocket()
See original GitHub issueThis works without setUseEngineSocketByDefault(true)
import java.io.IOException;
import java.net.Socket;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext;
import org.conscrypt.Conscrypt;
import org.conscrypt.OpenSSLProvider;
public class MainXX {
public static void main(String[] args)
throws NoSuchAlgorithmException, IOException, KeyManagementException {
Conscrypt.SocketFactories.setUseEngineSocketByDefault(true);
SSLContext sslContext = SSLContext.getInstance("TLS", new OpenSSLProvider());
sslContext.init(null, null, null);
Socket socket = sslContext.getSocketFactory().createSocket();
}
}
Exception in thread "main" java.net.SocketException: Socket is not connected.
at org.conscrypt.OpenSSLSocketImplWrapper.<init>(OpenSSLSocketImplWrapper.java:37)
at org.conscrypt.OpenSSLEngineSocketImpl.<init>(OpenSSLEngineSocketImpl.java:80)
at org.conscrypt.OpenSSLEngineSocketImpl.<init>(OpenSSLEngineSocketImpl.java:54)
at org.conscrypt.OpenSSLSocketFactoryImpl.createSocket(OpenSSLSocketFactoryImpl.java:84)
at okhttp3.MainXX.main(MainXX.java:19)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How do I diagnose "unable to create socket"? - Stack Overflow
Here's how to fix the problem: Chose the 32-bit version of R. Selecting the 32-bit version solves it! RStudio is SO great, it...
Read more >problem with SSL socket(SSLSocketFactoryImpl.createSocket())
Hello, I'm trying to create a ssl socket but I get an exception, I really don't know why. I have alredy include the...
Read more >unable to create socket | SAP Community
Hello,. I have idoc to soap scenario. When the message is trying to send, the soap receiver is throwing below error, kindly advice....
Read more >How to receive error on TCP socket? - Unreal Engine Forums
I have tcp client socket created by FSocket* Socket = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateSocket(NAME_Stream, ListenName, ...
Read more >SSLSocket via another SSLSocket not working #104 - GitHub
When creating an SSLSocket over an existing SSLSocket via SSLSocketFactory.createSocket() , the call to SSLSocket.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yschimke still targeting 1.0.0.
working with latest master