aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_channel.h
Commit message (Collapse)AuthorAgeFilesLines
* Clean up close_notify handling in TLSJack Lloyd2019-08-011-0/+2
| | | | | | Previously after sending or receiving a close_notify we would reset all handshake state and basically ignore anything the peer sent. Now we detect any garbage that might arrive after.
* Fix DTLS reconnectionJack Lloyd2019-07-131-6/+13
|
* Return the record metadata in a structJack Lloyd2019-07-051-0/+1
| | | | | | | Avoids passing pointers down the call stack. Also add a second buffer to hold the record plaintext, which avoids an extra alloc+free per record.
* Fix various issues in TLS found using BoGoJack Lloyd2019-05-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | - BoGo sends unparseable OCSP responses, so we have to accomodate for this by delaying decoding until verification and simply ignoring OCSP responses that we can't parse. - Check that there is no trailing garbage at the end of various messages. - Don't send empty SNI - Check the TLS record header versions (previously ignored) - For CBC 1/n-1 splitting split every record instead of just first. I think this is not a problem but it is what BoGo expects. - New Channel::application_protocol virtual (previously was implemented on both Client and Server but not shared). - Changes to resumption version handling. - Fix server version selection when newer versions are disabled. New policy hooks added in service of BoGo: - maximum_certificate_chain_size gives the maximum cert chain in bytes that we'll accept. - allow_resumption_for_renegotiation specifies if a renegotiation attempt can be simply (re-)resumed instead. - abort_handshake_on_undesired_renegotiation - previously we just ignored it with a warning alert. Now behavior is configurable. - request_client_certificate_authentication - require_client_certificate_authentication
* On resuming a client session, save the certificates that were used.Jack Lloyd2017-12-071-1/+1
| | | | GH #1303
* Add <functional> include to TLS headers which use std::functionJack Lloyd2017-11-141-0/+1
|
* More include header cleanupsJack Lloyd2017-09-211-1/+1
|
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-201-2/+2
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Add API stability annotations.Jack Lloyd2017-09-191-1/+1
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-181-25/+25
| | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
* No reason to deprecate this (only internally called) constructorJack Lloyd2016-11-261-1/+2
|
* Fix doxygen warnings [ci skip]René Korthaus2016-10-191-2/+4
|
* Improve tls doxygen [ci skip]René Korthaus2016-10-191-0/+18
|
* Changes to TLS::Callbacks for GH PR #457Jack Lloyd2016-08-161-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Make TLS::Channel::m_callbacks a reference, so deriving from TLS::Callbacks works Split out the compat (std::function) based interface to Compat_Callbacks. This avoids the overhead of empty std::functions when using the virtual interface, and ensures the virtual interface works since there is no callback path that does not involve a vtable lookup. Rename the TLS::Callback functions. Since the idea is that often an owning class will pass *this as the callbacks argument, it is good to namespace the virtual functions so as not to conflict with other names chosen by the class. Specifically, prefixes all cb functions with tls_ Revert changes to use the old style alert callback (with no longer used data/len params) so no API changes are required for old code. The new Callbacks interface continues to just receive the alert code itself. Switch to virtual function interface in CLI tls_client for testing. Inline tls_server_handshake_state.h - only used in tls_server.cpp Fix tests - test looked like it was creating a new client object but it was not actually being used. And when enabled, it failed because the queues were not being emptied in between. So, fix that.
* Compatibility patch for TLS::Callback interfaceMatthias Gierlings2016-06-191-0/+23
| | | | | - Added legacy constructor support for TLS::Channel, TLS::Client, TLS::Server.
* Added virtual Callback InterfaceMatthias Gierlings2016-06-191-45/+2
| | | | | | | | | - extracted inner class TLS::Channel::Callbacks to stand-alone class TLS::Callbacks. - provided default implementations for TLS::Callbacks members executing calls to std::function members for backward compatibility. - applied changes to cli, tests and TLS::Channel related classes to be compatible with new interface.
* Implemented Feedback on GH #457Matthias Gierlings2016-06-191-1/+1
| | | | | | - Removed deprecated TLS-Alert-Callback parameters. - Fixed improper naming of accessor for ALPN-Strings in tls_client.h - Fixed erroneous indentation on Ciphersuite Constructor.
* Reduction of code complexity in TLS classes.Matthias Gierlings2016-06-191-19/+62
| | | | | | | -reduced number of parameters in various methods -reduced cyclomatic complexity (McCabe-Metric) -removed "TLSEXT_HEARTBEAT_SUPPORT" from tls_extensions.h (leftover from heartbeat extension removal?)
* Remove support for the TLS min fragment length extension.Jack Lloyd2016-02-071-2/+0
|
* Remove TLS heartbeat support.Jack Lloyd2016-02-071-22/+0
| | | | | The signature of the alert callback remains unchanged to avoid breaking applications, though now the buffer parameter is never set.
* TLS improvementsJack Lloyd2015-10-251-3/+14
| | | | | | | | | | | | | | Use constant time operations when checking CBC padding in TLS decryption Fix a bug in decoding ClientHellos that prevented DTLS rehandshakes from working: on decode the session id and hello cookie would be swapped, causing confusion between client and server. Various changes in the service of finding the above DTLS bug that should have been done before now anyway - better control of handshake timeouts (via TLS::Policy), better reporting of handshake state in the case of an error, and finally expose the facility for per-message application callbacks.
* lib/tls: Convert &vec[0] to vec.data()Simon Warta2015-06-231-1/+1
|
* Add typedefs for function signatures/types used in TLS for easier readinglloyd2015-01-271-8/+13
|
* Ensure all files have copyright and license info.lloyd2015-01-101-1/+1
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Support setting the number of pad bytes in a heartbeat message. Uselloyd2015-01-071-47/+49
| | | | | random instead of all-zero padding. Check on sanity of received pads to the extent possible. Bugzilla 269.
* A TLS Server can now process either TLS or DTLS but not either,lloyd2014-11-151-0/+3
| | | | | with the setting set in the constructor. This prevents various surprising things from happening to applications and simplifies record processing.
* Add support for DTLS handshake timeouts and retransmissions.lloyd2014-10-061-2/+13
|
* Avoid initializer lists here, VC2013 doesn't like it. Github #18lloyd2014-05-011-5/+3
|
* Guess I won't be needing theselloyd2014-01-181-1/+0
|
* Move lib into srclloyd2014-01-101-0/+259