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
Sometimes you need to use plain socket connection and it's very easy with naga.
But sometimes you need to secure existing plain connection, for example, when
user makes some actions that needs to be secure.
I try the following:
secureSocket = new SSLSocketChannelResponder(plainSocket,
sslContext.createSSLEngine(), true);
but it doesn't work.
Original issue reported on code.google.com by abuhar...@gmail.com on 12 Mar 2011 at 7:19
The text was updated successfully, but these errors were encountered:
The correct way of using it is to use it like the normal NIOSocket classes,
i.e. create a NIOService then call
nioService.openSSLSocket(sslContext.createSSLEngine(), url, port). I see how
that was a bit confusing as the visibility of those classes were incorrectly
set to public.
I've fixed the visibility of the classes in the latest update.
Original comment by christof...@gmail.com on 12 Mar 2011 at 8:11
Without naga I can do:
------------------------------------------------
private Socket socket;
...
Socket plain = socket;
// Secure the plain connection
socket = context.getSocketFactory().createSocket(plain,
plain.getInetAddress().getHostName(), plain.getPort(), true);
// Initialize the reader and writer with the new secured version
initReaderAndWriter();
// Proceed to do the handshake
((SSLSocket) socket).startHandshake();
...
------------------------------------------------
How I can do it with naga?
Original comment by abuhar...@gmail.com on 15 Mar 2011 at 9:04
Original issue reported on code.google.com by
abuhar...@gmail.com
on 12 Mar 2011 at 7:19The text was updated successfully, but these errors were encountered: