Re: [akka-user] Problem with TLS with 1.0

2015-07-21 Thread Viktor Klang
Hi Thomas, Great to see you figured it out! I meant something along the lines of: val bidiFlow = BidiFlow.wrap(outboundFlow, inboundFlow)(Keep.none) bidiFlow atop tlsHandler join logicalFlow On Tue, Jul 21, 2015 at 9:45 AM, Thomas Zimmer t.zim...@eslgaming.com wrote: Thanks Chad and

Re: [akka-user] Problem with TLS with 1.0

2015-07-21 Thread Viktor Klang
Could you illustrate how you mean? On Tue, Jul 21, 2015 at 9:58 AM, Thomas Zimmer t.zim...@eslgaming.com wrote: One question in general: Is it better to have different FlowGraphs and set them up in one large or flow or join different Flows directly to each other? Regards, Thomas On

Re: [akka-user] Problem with TLS with 1.0

2015-07-21 Thread Thomas Zimmer
Thanks Chad and also thank you √ (Strange name it is :-) ). It seems to work now. This is my final code: /** * Setup the TLS Workflow (Prepare the cipher list etc) */ def getTlsFlow(): Flow[ByteString, ByteString, Any] = { // Setup session val session =

Re: [akka-user] Problem with TLS with 1.0

2015-07-21 Thread Thomas Zimmer
One question in general: Is it better to have different FlowGraphs and set them up in one large or flow or join different Flows directly to each other? Regards, Thomas On Tuesday, July 21, 2015 at 9:45:22 AM UTC+2, Thomas Zimmer wrote: Thanks Chad and also thank you √ (Strange name it is

Re: [akka-user] Problem with TLS with 1.0

2015-07-21 Thread Thomas Zimmer
Thanks Chad and also thank you √ (Strange name it is :-) ). It seems to work now. This is my final code: /** * Setup the TLS Workflow (Prepare the cipher list etc) */ def getTlsFlow(): Flow[ByteString, ByteString, Any] = { // Setup the prefered cipher suites val

[akka-user] Problem with TLS with 1.0

2015-07-20 Thread Thomas Zimmer
Hey, I really have problems understanding the TLS Bidi-Flows. The specs are not very helpful as they only do echo the input as fas as I understood and there is not official documentation. What I have so far: * A TCP flow (Flow[ByteString, ByteString]) * A logical flow (Flow[ByteString,

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Viktor Klang
A Flow is a graph with 1 input and 1 output, you are connecting the bidiflow (2 inputs and 2 outputs) to eachother, leaving no inputs nor outputs open, which means it cannot be a Flow. On Mon, Jul 20, 2015 at 2:58 PM, Thomas Zimmer t.zim...@eslgaming.com wrote: Hey, I really have problems

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Thomas Zimmer
Can you tell me how to setup the correct workflow here? I would like to have: incoming data (tcp) - tls - logicFlow.in logicFlow.out - tls - outgoing (tcp) Cheers and thanks for the help On Monday, July 20, 2015 at 3:17:49 PM UTC+2, √ wrote: A Flow is a graph with 1 input and 1 output, you

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Viktor Klang
Hi Thomas, as I said, I don't have access to a REPL right now. What does but i cannot use atop on top of the tlsHandler mean? What did you try, what did the compiler say? How did you adapt the code? Were you able to understand what I meant with my solution? On Mon, Jul 20, 2015 at 5:32 PM,

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Thomas Zimmer
hey do you have any code-examples? I tried: val wrappedFlow = BidiFlow.wrap(inboundFlow, outboundFlow) but i cannot use atop on top of the tlsHandler val tlsHandler = SslTls(sslContext, session, akka.stream.io.Role.server, closing) On Monday, July 20, 2015 at 5:01:46 PM UTC+2, √ wrote:

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Chad Retz
Here is an example from an old version of my project using atop: https://github.com/cretz/scimap/blob/dcd380e9f003864d768f1069c34b703dc488d10e/src/main/scala/scimap/handler/FlowBuilder.scala#L75. My more recent versions needed conditional TLS so I had to have a more complicated flow: