aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* We weren't handling DTLS handshake fragments at all. Now reject themlloyd2012-08-082-24/+35
| | | | | while continuing to work with unfragmented records and add the framework for defragmentation.
* Clean up DTLS handshake formattinglloyd2012-08-082-19/+21
|
* Make Handshake_IO::format constlloyd2012-08-082-5/+5
|
* Fix DTLS handshake encoding. Handle multiple messages in a packet.lloyd2012-08-082-31/+72
| | | | Handle DTLS CCS correctly.
* DTLS needs some help with ChangeCipherSpec because it is not includedlloyd2012-08-085-11/+51
| | | | | | | | 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.
* Move check of plaintext size to after MAC check. Use assign instead oflloyd2012-08-071-8/+8
| | | | resize+copy_mem.
* Remove Handshake_IO::have_full_record and Handshake_IO::emptylloyd2012-08-073-50/+14
| | | | | Have get_next_record return NONE+empty vector if no record availabe. IO::empty was completely unused.
* This was in an awkward placelloyd2012-08-071-2/+1
|
* Track the sequence number and return it from the record reader. Takelloyd2012-08-075-15/+33
| | | | | | | the sequence number into the handshake parser. This is ignored entirely by the stream handshake reader which does not need it, but is needed for DTLS. Track which epoch(s) we have seen a change cipher spec for.
* Wrap lineslloyd2012-08-062-2/+7
|
* Fix parenslloyd2012-08-061-1/+1
|
* Add a Policy item for if a client will accept a server-initiatedlloyd2012-08-062-1/+7
| | | | | renegotiation request. Defaults to true. If false, the client will send a non-fatal no_renegotiation alert.
* Expose Handshake_Message as an API type.lloyd2012-08-069-66/+117
| | | | | | | | | | | Use override as appropriate in tls_messages.h Add a callback to Handshake_State which, if set, is called for each Handshake_Message& as it is received or sent. Not yet exposed at the application level. Use default values in client and server hellos to minimize the need for explicit settings in constructors.
* Don't need to make these privatelloyd2012-08-061-5/+3
|
* The client wasn't sending a next protocol message on a sessionlloyd2012-08-061-0/+11
| | | | resumption.
* A heartbeat request send by the counterparty during a handshake wouldlloyd2012-08-061-5/+8
| | | | be passed to the application callback as a heartbeat response.
* Move server-specific parts of the handshake state to a server subclass.lloyd2012-08-064-21/+29
|
* Move things that are client specific in the handshake state to alloyd2012-08-062-16/+28
| | | | subclass created by Client::new_handshake_state
* Make the handshake hash privatelloyd2012-08-067-33/+36
|
* Make handshake session keys private with get/setlloyd2012-08-066-24/+33
|
* Make the handshake Ciphersuite only available by const reference.lloyd2012-08-068-36/+35
| | | | Derive it when the server hello is set.
* Const Handshake_State args where possiblelloyd2012-08-063-5/+5
|
* Move Certificate message to it's own file.lloyd2012-08-064-68/+89
| | | | Remove ~Extensions declaration, not used anymore.
* Use unique_ptr in Server_Kex_Exchange and Extensionslloyd2012-08-064-37/+19
|
* Store record MAC objects in unique_ptrlloyd2012-08-063-21/+12
|
* Have all the TLS handshake messages stored in unique_ptrs with onlylloyd2012-08-0615-294/+436
| | | | const access after setting them. Fix some const issues.
* m_ namespace remaining TLS messageslloyd2012-08-065-78/+78
|
* In the in-memory session manager, choose a random key at startup andlloyd2012-08-053-10/+28
| | | | | | | | encrypt all of the sessions, decrypting before return. This minimizes load on the locked memory (48 bytes master secret per session, vs 32 bytes for a single master key). It might also make recovering session data from memory dumps a little bit harder though this isn't worth counting on IMO
* Remove Channel::read_handshake. Have the server set expected next msglloyd2012-08-054-43/+15
| | | | in new_handshake_state.
* If we're negotiating a datagram protocol, allow a hello verifylloyd2012-08-031-2/+20
| | | | message. Add client-side hello verify handling.
* Take the initial record version from the Handshake_IO instance insteadlloyd2012-08-035-3/+24
| | | | of hardcoding it to SSLv3.
* Add Handshake_Hash::resetlloyd2012-08-033-3/+24
| | | | Add cookie support in Client_Hello.
* Add preliminary IO handler for datagram handshakes. Does not fragmentlloyd2012-08-032-0/+184
| | | | | outbound messages to MTU. Reassembly likely doesn't work, and is very vulnerable to DoS attacks.
* Rename all the message source files to msg_lloyd2012-08-0311-10/+10
|
* Combine Handshake_Writer and Handshake_Reader into Handshake_IO.lloyd2012-08-0320-245/+170
| | | | | | | | This is mostly just a minor code savings for TLS, but it actually seems important for DTLS because getting a handshake message can be a trigger for retransmitting previously sent handshake messages in some circumstances. Having the reading and writing all in one layer makes it a bit easier to accomplish that.
* Move the code that pretends a CCS message is a handshake message fromlloyd2012-08-023-40/+32
| | | | Channel to the handshake reader.
* Use TLS v1.0 PRF unless the version supports a ciphersuite specific PRFlloyd2012-08-021-4/+5
|
* Add TLS::Protocol_Version::supports_ciphersuite_specific_prflloyd2012-08-024-14/+16
|
* Fix DTLS HelloVerify message decodinglloyd2012-08-021-3/+12
|
* Use m_ namespace member vars in CurveGFplloyd2012-08-011-35/+36
|
* Move monty_invert to numthry.h and use it in CurveGFp as welllloyd2012-08-014-51/+48
|
* Remove z_size parameter to bigint_monty_redc because it should alwayslloyd2012-08-014-26/+12
| | | | | | | | | | | be 2*(p_size+1). Document that it clears the high part of z. Don't clear the workspace before calling Karatsuba in bigint_mul or bigint_sqr - they clear it every time anyway. Don't bother masking words in the Montgomery_Exponentiator as redc zeros those words. Also don't bother calling z.clear() as the multiply operation does that already.
* Cleanup BigInt::cmplloyd2012-08-014-41/+43
| | | | | | Move bigint_divcore to divide.cpp which is the only place it is used. Probably not computationally intensive enough to really be worth optimizing in asm.
* Move all BigInt constructors to the top of the decllloyd2012-08-011-81/+82
|
* Remove BigInt::assignlloyd2012-08-012-25/+24
|
* Remove BigInt(NumberType type, size_t n) and replace it with a staticlloyd2012-08-019-37/+24
| | | | BigInt function power_of_2. (Power2 was the only available NumberType)
* Remove all support for octal BigInt conversions.lloyd2012-08-014-39/+25
|
* Remove BigInt::get_reglloyd2012-08-013-13/+6
|
* Remove BigInt::operator[]. Use BigInt::word_at, which checks sizeslloyd2012-08-014-14/+12
|
* Remove BigInt::operator[] returning a mutable word referencelloyd2012-08-013-13/+9
|