Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | In Channel, pre-size the IO buffers to 16K to avoid excess allocations. | lloyd | 2013-04-11 | 1 | -0/+7 |
| | | | | Translate Integrity_Failure exceptions to bad_record_mac | ||||
* | Add a param to Connection_Cipher_State so it knows which direction | lloyd | 2013-04-10 | 1 | -0/+2 |
| | | | | processing is happening. | ||||
* | Move assert.h from internal to very public (included in types.h) | lloyd | 2013-03-13 | 1 | -1/+0 |
| | | | | | | This reduces friction to writing an assert, so hopefully there will be more of them as a result. And we can use asserts in public headers now, very useful for templates. | ||||
* | Simplify this catch | lloyd | 2013-02-11 | 1 | -6/+1 |
| | |||||
* | Don't need to pass the sequence numbers struct in here, all we need is | lloyd | 2012-12-14 | 1 | -1/+1 |
| | | | | the value we want to use this time. | ||||
* | Add a Record struct to combine the record contents, type, sequence #, | lloyd | 2012-12-10 | 1 | -31/+23 |
| | | | | and version into a single value. | ||||
* | Changes so DTLS handshake can send messages under different epochs, eg | lloyd | 2012-11-12 | 1 | -31/+40 |
| | | | | for retransmitting a flight. | ||||
* | Remove Channel::m_max_fragment. Instead derive it from the server | lloyd | 2012-11-07 | 1 | -10/+19 |
| | | | | | | hello. This also fixes a bug where a client which sent the fragment limit would enforce it even for servers which did not support the extension. | ||||
* | Remove Channel::m_connection_closed, instead deriving it from other state | lloyd | 2012-11-07 | 1 | -6/+11 |
| | |||||
* | Pass read_record a callback mapping epoch to cipher state so it can | lloyd | 2012-11-06 | 1 | -42/+15 |
| | | | | read out of order messages in DTLS. | ||||
* | Add Channel::pending_state and Channel::active_state, use where possible | lloyd | 2012-11-06 | 1 | -73/+80 |
| | |||||
* | Store cipher states in Channel instead of Handshake_State. Keep all | lloyd | 2012-11-06 | 1 | -16/+93 |
| | | | | | around by default, expiring them as they are no longer needed. Expiration logic for DTLS needs some work. | ||||
* | Move Channel::is_{active,closed} to source file | lloyd | 2012-11-01 | 1 | -0/+10 |
| | |||||
* | Inline Channel::{read,write}_cipher_state, only one caller each | lloyd | 2012-09-14 | 1 | -20/+11 |
| | |||||
* | Store the cipher states in the handshake state object as shared_ptrs. | lloyd | 2012-09-13 | 1 | -34/+42 |
| | | | | | | One notable change here is that after we send a close_alert, we ignore any data that follows. That is somewhat unfortunate actually, but overall this change is important (for DTLS). | ||||
* | Remove Channel::m_secure_renegotiation, instead derive from current state. | lloyd | 2012-09-12 | 1 | -45/+23 |
| | |||||
* | Formatting | lloyd | 2012-09-11 | 1 | -2/+2 |
| | |||||
* | Clean up the handling of close notify alerts a bit. Also return | lloyd | 2012-09-11 | 1 | -6/+7 |
| | | | | | immediately from received_data when we see a fatal alert - we are uninterested in any further data at that point. | ||||
* | Add helper function | lloyd | 2012-09-11 | 1 | -7/+5 |
| | |||||
* | Set m_readbuf_pos == m_readbuf.size(), resizing the vector as needed | lloyd | 2012-09-11 | 1 | -3/+1 |
| | | | | rather than preallocating the maximum possible size. | ||||
* | The write buffer is cleared and rewritten by write_record, so we don't | lloyd | 2012-09-11 | 1 | -1/+0 |
| | | | | | | need to pre-size it. Reorganize Channel members a bit | ||||
* | Pass the record sequence # up to Channel | lloyd | 2012-09-11 | 1 | -4/+5 |
| | |||||
* | Move the record type checks up to Channel as besides that the record | lloyd | 2012-09-11 | 1 | -21/+20 |
| | | | | reader doesn't care what the record type is. | ||||
* | New logic for DTLS replay detection. Abstracts the sequence handling | lloyd | 2012-09-10 | 1 | -20/+27 |
| | | | | out a bit. Handling of initial server record is pretty nasty. | ||||
* | Remove redundant Channel::m_current_version | lloyd | 2012-09-09 | 1 | -21/+27 |
| | |||||
* | Create the IO in Channel and then pass it down to new_handshake_state | lloyd | 2012-09-09 | 1 | -8/+23 |
| | | | | as the logic is the same for both cases. | ||||
* | Hide Channel::m_rng and Channel::m_session_manager, add getters | lloyd | 2012-09-09 | 1 | -2/+2 |
| | |||||
* | Add support for key material export | lloyd | 2012-09-07 | 1 | -0/+33 |
| | |||||
* | Remove Channel::m_peer_certs, instead retrieve directly from the state. | lloyd | 2012-09-07 | 1 | -0/+7 |
| | | | | | | | | This also very happily avoids a race in renegotiation. If you first negotiated using cert X, then renegotiated with Y, during the period between the certificate message and the finished message, Channel::peer_cert_chain would return Y instead of X. Now, it returns Y only after the finished message has been verified. | ||||
* | Take version from pending state for creating cipher spec | lloyd | 2012-09-07 | 1 | -3/+3 |
| | |||||
* | Inline Secure_Renegotiation_State into Channel as so much of the date | lloyd | 2012-09-07 | 1 | -20/+36 |
| | | | | is rederivable now that we hold both states in memory. | ||||
* | Pass the current active state as well as the pending state which is | lloyd | 2012-09-07 | 1 | -1/+3 |
| | | | | | quite helpful in the server. May also be useful for the renegotiation extension. | ||||
* | Keep two handshake states around, swap them when | lloyd | 2012-09-07 | 1 | -58/+59 |
| | | | | Channel::activate_session is called. | ||||
* | Reindent | lloyd | 2012-09-07 | 1 | -10/+11 |
| | |||||
* | In Channel move some checks to after we've verified needed == 0 to | lloyd | 2012-09-07 | 1 | -10/+7 |
| | | | | | | avoid a conditional. Clean up record checking in the reader. | ||||
* | Remove bogus forced 64 byte mtu. | lloyd | 2012-09-07 | 1 | -1/+6 |
| | | | | | | | Fix DTLS CCS sequence number reset. Handle (partially) explicit sequence numbers in records. Need to output the record. | ||||
* | Have write_record resize the vector as it goes, thus the return value | lloyd | 2012-09-06 | 1 | -9/+9 |
| | | | | is not needed. Doesn't actually cause reallocations as we preallocate. | ||||
* | Inline current_protocol_version, fix fragment limit check | lloyd | 2012-09-06 | 1 | -10/+11 |
| | |||||
* | Make Channel::m_state private | lloyd | 2012-09-06 | 1 | -1/+19 |
| | |||||
* | Pass process_handshake_msg a reference to the Handshake_State | lloyd | 2012-09-06 | 1 | -1/+4 |
| | |||||
* | Inline Record_Reader to Channel as well | lloyd | 2012-09-06 | 1 | -16/+42 |
| | |||||
* | Inline Record_Writer to Channel | lloyd | 2012-09-06 | 1 | -15/+90 |
| | |||||
* | Add Channel::send_record | lloyd | 2012-09-06 | 1 | -3/+8 |
| | |||||
* | Add more functions to Channel, hiding Record_Reader entirely and most | lloyd | 2012-09-06 | 1 | -0/+34 |
| | | | | of Record_Writer. | ||||
* | Make a number of members of Channel private instead of protected | lloyd | 2012-09-06 | 1 | -6/+22 |
| | |||||
* | Hoist m_rng to Channel | lloyd | 2012-09-06 | 1 | -0/+1 |
| | |||||
* | Remove Record_Writer::send_alert. Move Alert serialization to Alert::serialize | lloyd | 2012-09-04 | 1 | -1/+1 |
| | |||||
* | Use a std::function so handshake_io only has access Record_Writer's | lloyd | 2012-09-04 | 1 | -1/+1 |
| | | | | send function. | ||||
* | DTLS needs some help with ChangeCipherSpec because it is not included | lloyd | 2012-08-08 | 1 | -1/+1 |
| | | | | | | | | in the message_seq count. When we are asking for the next handshake msg, tell the handshake IO layer if we are expecting a CCS or not. Then DTLS just needs to track which epoch(s) it has seen the CCS for, and which epoch it is currently in. This is all ignored by the stream IO layer. | ||||
* | Remove Handshake_IO::have_full_record and Handshake_IO::empty | lloyd | 2012-08-07 | 1 | -3/+6 |
| | | | | | Have get_next_record return NONE+empty vector if no record availabe. IO::empty was completely unused. |