summaryrefslogtreecommitdiffstats
path: root/src/handshake.c
AgeCommit message (Collapse)Author
2015-01-14Allow to configure methods per peer groupMatthias Schiffer
2015-01-12Make MTU mismatches fatalMatthias Schiffer
As fastd calculates its receive buffer sizes based on the MTU, not matching MTUs is bound to cause issues anyways, so let's fail completely.
2015-01-09Move protocol-specific TLV specifications to main handshake record enumMatthias Schiffer
2015-01-09More comment fixesMatthias Schiffer
2015-01-09Add support for a new big-endian handshake formatMatthias Schiffer
Because of strange dicisions in the past, fastd currently uses little endian type and length values in its handshake. As the common network byte order is big endian, changing the handshake format would be preferable. This commit adds support for a new big-endian handshake. For now, fastd will continue to send little-endian handshakes so ensure backwarts compatiblity, but if it receives a big-endian handshake, it will respond with a big-endian one.
2015-01-06handshake: get rid of stpcpyMatthias Schiffer
stpcpy was added in POSIX.1-2008 and is not present on some systems like Android.
2014-10-22Use big endian for handshake field values by defaultMatthias Schiffer
At the moment the only multi-byte field is the MTU; it is kept in little endian to provide backwards compatiblity. Future fields will be big endian.
2014-09-20Some handshake fixes for future protocol extensionsMatthias Schiffer
Extensions for arbitrary-length integers.
2014-09-04Nicer handshake error messages instead of "unacceptable value"Matthias Schiffer
2014-08-24Coding style: always add a space between a pointer's type and the *Matthias Schiffer
2014-08-02Introduce and use alloc helpersMatthias Schiffer
These new helpers will terminate fastd on allocation failures and add some additional convenience (allow strdup with NULL; typesafe new(type) macros).
2014-05-28Still more documentationMatthias Schiffer
2014-04-25handshake: simplify fastd_handshake_new_replyMatthias Schiffer
This will hopefully lead to an async verify implementation...
2014-04-20Make ctx globalMatthias Schiffer
2014-04-20Make conf globalMatthias Schiffer
2014-03-14Adjust copyright yearsMatthias Schiffer
2014-01-26Remove unused REPLY_TYPESMatthias Schiffer
2013-11-30Perform string-based lookup of method-related information only onceMatthias Schiffer
2013-10-31Change error subcode for unsupported method from method name to method listMatthias Schiffer
When two peers don't support a common method, fastd should notice this in the list stage, so the method list subcode is correct. The method name subcode was a legacy of the 0.4 compatiblity code.
2013-10-29handshake: get_method() code simplificationMatthias Schiffer
2013-10-29Drop compatiblity code for fastd 0.4Matthias Schiffer
2013-10-29Handle methods as stringsMatthias Schiffer
2013-10-29Allow using libsodium instead of NaClMatthias Schiffer
As libsodium has some strange include files (like a version.h), we try to use absolute include paths whenever possible in fastd now and rename our generated headers.
2013-10-28Organize method and protocol source files into distinct source directoriesMatthias Schiffer
2013-10-24Fix maybe-uninitialized warningMatthias Schiffer
2013-10-20Don't print fastd version from handshake requests when secure handshakes are ↵Matthias Schiffer
set, instead print it on handshake finish
2013-10-20Don't send chosen method name when it doesn't matterMatthias Schiffer
2013-10-20Align handshake bufferMatthias Schiffer
2013-10-20Always check for mode and protocol mismatchesMatthias Schiffer
This was accidentially disabled in the previous commit for initial handshake requests.
2013-10-20Refactor handshake code, prevent downgrade attacksMatthias Schiffer
2013-10-19Rename RECORD_HANDSHAKE_MAC to RECORD_TLV_MACMatthias Schiffer
2013-10-19Authenticate the TLV records onlyMatthias Schiffer
2013-10-19Use the rsv2 field in the handshake header as an optional length field to ↵Matthias Schiffer
facilitate future extensions
2013-10-19Get rid of packet.hMatthias Schiffer
2013-10-19Add a HMAC to authenticate all handshake TLVMatthias Schiffer
2013-10-16Initiate handshake when a packet can't be sent because the local address is ↵Matthias Schiffer
invalid
2013-08-29Replace old task queueMatthias Schiffer
The handshakes are now schedules in a doubly-linked list that is maintained as a part of the peer structure.
2013-08-17Make handshake records const uint8_t* instead of void*Matthias Schiffer
This enforces explicit casting and thus avoids alignment problems.
2013-07-25Move _GNU_SOURCE define to types.hMatthias Schiffer
2013-06-09Fix some whitespace errorsMatthias Schiffer
2013-04-20Greatly improve handling of hosts with multiple IP addressesMatthias Schiffer
2013-02-23Use fastd_peer_t instead of fastd_peer_config_t in handshake codeMatthias Schiffer
Directly using the peers allows us to get rid of the inefficient get_peer() function and is necessary for adding support for unknown peers.
2013-01-21Fix indentation in handshake packet allocMatthias Schiffer
2013-01-21Add error message for OOM on buffer allocMatthias Schiffer
2013-01-05Adjust copyright yearsMatthias Schiffer
2013-01-04Move const specifiers in handshake record names to the correct placeMatthias Schiffer
2012-12-18Convert type names to _t conventionMatthias Schiffer
2012-11-01Dynamically create and destroy sockets without fixed bindsMatthias Schiffer
2012-10-29Add support for multiple bindsMatthias Schiffer
2012-07-02Remove unneeded includeMatthias Schiffer