Questions about TLS record behaviour.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Questions about TLS record behaviour.

Katie Lucas


I have a couple of questions about the records which are passed
between SSL sockets.

I understand application level messages are chunked, encrypted,
transmitted, dencrypted, and de-chunked.

At the point at which they are chunked, does any gathering take place?
In particular, is the tranmission of the last chunk delayed to
accumulate more data, or is it transmitted short/padded?

{Or have I completely misunderstood how this works?}



Also, is there a way to get the SSL layer to process frames
(decrypting them) if there any available on the TCPIP socket -- doing
a read will (presumably) do the currently pending data and then start
waiting on more frames to arrive, but it would be nice to just process
what frames there are and then use them.


The reason I'm asking is that we are trying to interleave usage of the
comms system, and a (reasonably) nice way to do it would be to say

        if socket has data
                process frames
        if pending > expected message size
                read message
        else
                while(socket suitably writeable &
                                we have outgoing work on the queue)
                        transmit messages


The issue being that (as I understand, but please correct me if I'm
wrong) if we start a non-blocking receive, but it fails to complete,
we can't then do a non-blocking send while we're waiting; so I'd kind
of like to leave the receive until we're reasonably sure it'll
complete -- at which point I can just do a blocking read.



Cheers for any help!

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]