summaryrefslogtreecommitdiff
path: root/lib/dtls.h
Commit message (Collapse)AuthorAgeFilesLines
* lib: drop gnutls_uint64 usage as sequence numberDmitry Eremin-Solenikov2019-10-241-1/+1
| | | | | | | | GnuTLS is depending already on uint64_t being a properly defined type. So there is no need to have a special byte-array type for 8-byte integers. Use uint64_t instead, thus simplifying a code quite heavily. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* Add const to several read-only packet sequence paramstmp-fix-coverityTim Rühsen2019-10-151-1/+1
| | | | Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
* Add or clean header guards in lib/Tim Rühsen2019-05-071-3/+3
| | | | Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
* Use https:// for www.gnu.org and www.example.comTim Rühsen2019-03-131-1/+1
| | | | Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
* system: provide a means to replace gettime implementationDaiki Ueno2018-10-261-1/+1
| | | | | | | | | While gettime() is extensively used in the code, the library previously hadn't provided a way to replace it for testing. This adds a new internal function _gnutls_global_set_gettime_function and makes use of it through virt-time.h. Signed-off-by: Daiki Ueno <dueno@redhat.com>
* record: adjusted overhead calculation for TLS1.3Nikos Mavrogiannopoulos2018-02-191-2/+3
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* DTLS: improved data MTU calculation under CBC ciphersuitesNikos Mavrogiannopoulos2018-01-161-4/+3
| | | | | | | | | | | | | | | | | The data MTU calculation under CBC ciphersuites takes into account that the overhead of these ciphersuites is constant (IV + hash + 1 byte padding), though the capacity varies due to the padding block. That is, on 16-byte padding block, one padding byte is the overhead but the rest 15 bytes are accounted for data MTU. That also has the side effect that setting a data MTU using gnutls_dtls_set_data_mtu(), is not definite, and the actual MTU may be larger for these ciphersuites --i.e., the return value of gnutls_dtls_get_data_mtu(). Resolves #360 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* record: more precise calculation of max recv sizeNikos Mavrogiannopoulos2017-07-131-0/+5
| | | | | | | | Previously we were using a rough calculation of the max recv size based on maximum values. Now we calculate the exact maximum value once the epoch is initialized and enforce it throughout the session. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Rename uint64 to gnutls_uint64 to avoid conflict with macOSDavid Caldwell2017-04-061-1/+1
| | | | Signed-off-by: David Caldwell <david@porkrind.org>
* several spacing fixes to keep syntax-check happyNikos Mavrogiannopoulos2016-09-111-1/+1
|
* dtls: imported Fridolin's DTLS sliding window implementationNikos Mavrogiannopoulos2016-07-131-1/+1
| | | | This simplifies the current code, and reduces the memory needed.
* instead of assigning a variable per flag use the init flags directlyNikos Mavrogiannopoulos2016-04-281-1/+1
| | | | | That is store the flags provided in gnutls_init() in the session structure and use these flags directly when required.
* dtls: reset the record number sliding window on gnutls_record_set_state()Nikos Mavrogiannopoulos2016-03-311-0/+1
| | | | | | | | This addresses issue where gnutls_record_set_state() was called with a new state but the sliding window information was not updated, thus blocking any incoming packets. Resolves #82
* Removed the 'gnutls_' prefix from files to simplify file namingNikos Mavrogiannopoulos2015-08-231-0/+132