naga with SSL

37 views
Skip to first unread message

Andreas

unread,
Mar 5, 2012, 1:38:01 PM3/5/12
to naga-...@googlegroups.com
Hi Christoffer,
 
I'm trying to establish an SSL-connection from an Android device to our
server using naga. I use the same methods for creating the trustManager
etc like I do for synchronous sockets in other places in the code. It seems
that the connection gets established but the connectionBroken method
is called right away afterwards. Do you have any hints or an example
in addition to the SSLTester.java? I really need to get this running and
I'm out of ideas and becoming desperate...
 
Thanks a lot in advance,
 
Andreas

Christoffer Lernö

unread,
Oct 16, 2012, 9:59:29 AM10/16/12
to naga-...@googlegroups.com
Hi,

Sorry I didn't quite catch this mail and you probably moved on. 

Anyway, I'm still not happy with the SSL-implementation I've made.

The main reason the SSL-implementation is weak is because I'm not personally using Naga with SSL. In fact, I think if you're starting to play around with SSL then Naga isn't your best choice. There are other, more framework-ey libraries for that.

Naga is really just the basic foundation code you need whenever you're writing standard asynchronous sockets, especially server-side sockets.

My own experience with socket security usually leads me *away* from SSL, and towards proprietary solutions. There are advantages and disadvantages with either approach. If you roll your own security, it's easy to make mistakes as well.

In the cases I would want to use SSL for a simple project, I'd probably use normal sockets + threads on java (despite the headaches that entails).

There are some SSLSocketChannel "implementations" available, but they provide a leaky abstraction. The best I could do without writing a few SSL projects with naga is the very alpha-state implementation available.

I don't recommend using it. If you need SSL and you can't implement it on top of Naga, Naga might not be your ideal choice anyway.

/C
Reply all
Reply to author
Forward
0 new messages