aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_client.cpp
Commit message (Collapse)AuthorAgeFilesLines
* TLS_Ciphersuite_Algos was just a strange level of indirection betweenlloyd2012-01-201-20/+10
| | | | | | | | the ciphersuite code and a set of strings specifying the underlying suite algorithms. Remove it entirely. Some things are likely broken. One I know about is that we always send the hash/signature type indicator but should only do so for TLS >= 1.2
* Many fixes for TLS 1.2 though some things in particular client authlloyd2012-01-201-3/+2
| | | | | | remain broken. New interface for querying the TLS extensions, much cleaner.
* Kinda maybe working TLS 1.2 for clients. Not well tested at all, but alloyd2012-01-191-10/+13
| | | | | | | | basic connection with a GnuTLS server does work. Currently we don't respect the signature_algorithms extension at all, and using SHA-256 with a 12-byte finished value is hardcoded though the spec is that it can depend on the ciphersuite (likely relevant for GOST ciphersuites in particular).
* I'm not sure if I like this asthetically, but passing around thelloyd2012-01-191-28/+18
| | | | | | | | | | | | | | | | | | entire handshake state in many cases makes things simpler to update, in that each message type already knows what it needs depending on the version, params, etc, and this way a) that knowledge doesn't need to percolate up the the actual client and server handshake code and b) each message type can be updated for new formats/version without having to change its callers. Downside is it hides the dependency information away, and makes it non-obvious what needs to be created beforehand for each message to work correctly. However this is (almost) entirely predicated on the handshake message flows, and these we control with the next expected message scheme, so this should be fairly safe to do. This checkin only updates the ones where it was immediately relevant but for consistency probably all of them should be updated in the same way.
* Support SSLv3 client auth on the client side.lloyd2012-01-191-7/+11
| | | | | | Add getters for major and minor protocoll version on TLS_Session. Add Certificate_Type code points for ECC certs.
* The server would incorrectly send a server key exchange message when alloyd2012-01-061-13/+5
| | | | | | | | | | | | | | | | | | pure RSA ciphersuite was negotiated. Detection of version rollback attacks with pure RSA ciphersuites was incorrect and would cause failures if the client supported a version we didn't (eg GnuTLS with TLS 1.2 enabled). Improve detection of SSLv2 client hellos. In particular, if a client that only supports SSLv2 connects, we will detect this case and send a protocol_version alert (which the SSLv2-only client will not understand, but a packet analyzer probably will) plus an exception with the message "Client claims to only support SSLv2, rejecting" instead of the previous much less helpful "Unknown record type" message. Remove vestigial support for RSA export ciphersuite key exchange.
* Add a hook in TLS_Channel that is called when an alert is received.lloyd2012-01-041-0/+12
| | | | | | | | | Currently has the same behavior in client and server; if we got a NO_RENEGOTIATION alert, and we appear to be renegotiating, delete the state if it exists. Noticed when talking to OpenSSL 0.9.8g which rejects all renegotiation requests.
* As someone pointed out on the TLS list, NPN isn't really a negotiationlloyd2012-01-041-3/+3
| | | | per-se, it's a notification by the client. Rename accordingly.
* Add support for next protocol negotiation. Client only currently;lloyd2012-01-041-4/+26
| | | | tested with google.com:443
* If the handshake_fn returns false explicitly remove the session fromlloyd2012-01-031-0/+2
| | | | | the cache. The current handshake will complete, but the session can not be resumed later.
* Assume handshake_fn existslloyd2012-01-031-6/+1
|
* Make handshake completion function non-optional. Now returns a boollloyd2012-01-031-3/+6
| | | | specifying if the session should be saved to the session cache.
* Add Credentials_Manager which is an interface to something that knowslloyd2012-01-031-26/+19
| | | | | what certs, keys, etc are available to the app. Needs polishing but it seems like it should be sound.
* Some basic infrastructure pieces for SRP (policy, etc)lloyd2011-12-311-5/+4
|
* Add support for client-side session resumptionlloyd2011-12-311-27/+116
|
* Rename the session type to 'TLS_Session'. Split the manager out intolloyd2011-12-301-2/+2
| | | | its own file. Rename tls_state to tls_handshake_state.
* Add a function for getting the version number of an active connection.lloyd2011-12-301-5/+6
| | | | | | | | Add a new callback that is called with the session info when a handshake completes. Currently only called on the server side as the client doesn't have session resumption yet. Rename CipherSuite to TLS_Cipher_Suite.
* Prevent ping-ponging of close alerts by tracking both if a handshakelloyd2011-12-301-1/+1
| | | | | has been completed and if the connection has been definitely closed by a fatal alert or a close notify.
* Full support for renegotiation including RFC 5746 extensions forlloyd2011-12-301-4/+0
| | | | | | | | | | | | | client and server. Server side can handle SCSV values as well, client always sends the extension instead. Handle an empty SNI extension coming back from the server - this is used to indicate that it understood the name. Also add better checking for extensions by passing in what the supposed size of the extension is. Only send the secure negotiation extension in the server hello if the client indicated support for it.
* Many renegotiation fixes. Add support for the secure renegotiationlloyd2011-12-301-14/+56
| | | | | extension (client side only at the moment). Add an interface that allows applications to request renegotiation.
* About half an implementation of RFC 5746lloyd2011-12-291-4/+7
|
* Add support for sending server name indicator in client hellolloyd2011-12-291-6/+14
| | | | | | | | Add support for sending and reading the SRP identifier extension. Add some helper classes for managing TLS extensions Add ciphersuite codes for SRP key exchange.
* Clean up the ordering of constructor args to the various message typeslloyd2011-12-291-11/+11
|
* Don't buffer in the record writer at all - we immediately process andlloyd2011-12-281-1/+0
| | | | | | | | send out inputs as they are available. Thus, flushing is never required, and we avoid some unnecessary copying. If we are using a CBC mode cipher in SSLv3/TLSv1.0, send a 1-byte fragment to start to prevent the adaptive plaintext attack.
* Save peer certs in session info. Use helper function for handshakelloyd2011-12-281-7/+1
| | | | hashing.
* Working though hacking client verify (server side only). Only supportslloyd2011-12-281-2/+0
| | | | | TLS 1.0/1.1, SSLv3 uses a different hash format. Only RSA certs tested so far.
* Partial bits of the server side of client auth. Incomplete.lloyd2011-12-281-1/+3
| | | | | | Pass a session manager to TLS_Client's constructor. Currently unused. Add time-based session expiration to the in-memory session cache.
* Make tls_session_key.h an internal headerlloyd2011-12-271-0/+1
|
* First rev of working session resumption (server side only). Only workslloyd2011-12-271-0/+2
| | | | with TLS at the moment, SessionKeys is a mess.
* Much smarter state transition checking: at each point in thelloyd2011-12-271-85/+35
| | | | | | | | handshake, keep track of exactly which handshake message type(s) we can expect and assert before processing that what we recieved is what we expected. Contrast with previous 'checking' which was more in the style 'could we perhaps plausibly do something with this message?' aka broken.
* Initial hooks for session resumptionlloyd2011-12-231-1/+1
|
* Centralize a lot of the handshaking and message parsing in TLS_Channellloyd2011-12-231-182/+8
| | | | Also delete the obsolete/never worked CMS examples
* Rename ssl module to tlslloyd2011-12-231-0/+499