Home | Trees | Indices | Help |
---|
|
TLS Record Layer socket that provides Message level abstraction
Because the record layer has a hard size limit on sent messages, they need to be fragmented before sending. Similarly, a single record layer record can include multiple handshake protocol messages (very common with ServerHello, Certificate and ServerHelloDone), as such, the user of RecordLayer needs to fragment those records into multiple messages. Unfortunately, fragmentation of messages requires some degree of knowledge about the messages passed and as such is outside scope of pure record layer implementation.
This class tries to provide a useful abstraction for handling Handshake protocol messages.
|
|||
|
|||
generator |
|
||
|
|||
generator |
|
||
|
|||
generator |
|
||
|
|||
generator |
|
||
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Defragmenter |
defragmenter defragmenter used for read records |
||
int |
recordSize maximum size of records sent through socket. |
||
tuple |
unfragmentedDataTypes data types which will be passed as-read, TLS application_data by default |
||
Inherited from |
|
|||
Inherited from |
|
Apply TLS Record Layer abstraction to raw network socket.
|
Empty the queue of messages to write Will fragment the messages and write them in as little records as possible.
|
Queue message for sending If the message is of same type as messages in queue, the message is just added to queue. If the message is of different type as messages in queue, the queue is flushed and then the message is queued.
|
Read next message in queue will return a 0 or 1 if the read is blocking, a tuple of RecordHeader3 and Parser in case a message was received.
|
Fragment and send a message. If a messages already of same type reside in queue, the message if first added to it and then the queue is flushed. If the message is of different type than the queue, the queue is flushed, the message is added to queue and the queue is flushed again. Use the sendRecord() message if you want to send a message outside the queue, or a message of zero size.
|
|
recordSizemaximum size of records sent through socket. Messages bigger than this size will be fragmented to smaller chunks. Setting it to higher value than the default 2^14 will make the implementation non RFC compliant and likely not interoperable with other peers.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Nov 11 12:49:22 2015 | http://epydoc.sourceforge.net |