Commit graph

62 commits

Author SHA1 Message Date
Simon Walton
131a57248b NLPacket local ID could be used uninitialized (according to valgrind) 2018-06-08 10:27:03 -07:00
Simon Walton
4fa11f116f Add & use HMACAuth method that calculates hash atomically
To avoid issues with race conditions involving separate
addData() and result() calls use a method that does
both in the lock.
2018-04-25 14:41:16 -07:00
Simon Walton
21a9525a73 Version of HMACAuth with exposed lock
Client is responsible for locking between adding and
retrieving. Fixes a likely race.
2018-04-24 17:52:12 -07:00
Simon Walton
9f9a68188d Merge remote-tracking branch 'upstream/master' into short-id 2018-04-20 11:10:21 -07:00
Simon Walton
d3464378b7 Short local source IDs - checkpoint
DS assigns 16-bit IDs as well as UUIDs; ACs track mappings;
nodes use short IDs in packets. Initial setup works; then
fails prob. due to DS UUID.
2018-03-27 13:46:58 -07:00
Simon Walton
eb04f77c3d HMAC Auth - code modifications requested by reviewer 2018-03-21 14:04:34 -07:00
Simon Walton
020a6a6585 Take out hash timing code 2018-03-19 15:57:32 -07:00
Simon Walton
da7298b8bd Support only HMAC - take out passing around of secret UUID
Also other clean-up for production use.
2018-03-19 15:28:44 -07:00
Simon Walton
db8a1ccb3e Set HMAC key once and reuse OpenSSL context
Store the HMAC wrapper in Node. Unfortunately requires a
lot of plumbing down to NLPacket. Added a mutex to the
wrapper since suspicious crashes occurred.
Authentication times seem to be comparable to existing MD5.
2018-03-16 18:03:13 -07:00
Simon Walton
480f76c21a Quick trial of HMAC-MD5 auth + timings 2018-03-16 11:50:03 -07:00
Simon Walton
82b68fce8d Quick attempt at using openssl HMAC in NLPacket 2018-03-15 18:32:48 -07:00
Seth Alves
186035dc5d adjust various things that cause a crash-on-exit on Linux 2017-08-06 11:57:55 -07:00
Stephen Birarda
e4ebafa0d8 add a menu option to force the wrong DS connect version 2016-06-09 15:53:19 -07:00
Brad Hefta-Gaub
2eef07e414 cleanup and dead code removal 2016-05-24 15:38:08 -07:00
Brad Hefta-Gaub
1d9981e624 first cut at support for verifying all protocol version compatibility 2016-05-24 13:31:19 -07:00
Ryan Huffman
0b3986ef9b Replace NLPacket unique_ptr ctor with && ctor 2015-08-18 23:09:02 -07:00
Stephen Birarda
e4c1de7845 fix variable names for sourced/verified 2015-08-18 17:15:09 -07:00
Stephen Birarda
04c1d154ab fix header size for NLPacket writeTypeAndVersion 2015-08-10 10:10:43 -07:00
Stephen Birarda
41c6220731 resolve conflicts on merge with upstream/master 2015-07-31 17:27:23 -07:00
Stephen Birarda
b0afdb21ad correct the unique_ptr char allocations 2015-07-31 14:29:05 -07:00
Atlante45
e8ffe96232 Remove const_cast 2015-07-30 15:58:05 -07:00
Atlante45
3a9aedea68 Fix packet ctors size param 2015-07-30 15:56:42 -07:00
Atlante45
9e7644ee78 Change headers/payload size computation 2015-07-30 15:05:51 -07:00
Stephen Birarda
7c87ee3a72 type and version fixes after refactor 2015-07-29 17:37:33 -07:00
Stephen Birarda
49a18be24b use totalHeadersSize from Packet in NLPacket 2015-07-24 16:11:25 -07:00
Stephen Birarda
d938f31fab fix for write of sourceID and verificationHash 2015-07-23 17:10:40 -07:00
Stephen Birarda
b68c7fd92a first adjustment in NLPacket after type is known 2015-07-23 16:59:08 -07:00
Stephen Birarda
069dff0793 fix bugs from movement of type/version to NLPacket 2015-07-23 16:40:35 -07:00
Stephen Birarda
2f03075750 repairs to type/version header write 2015-07-23 15:57:31 -07:00
Stephen Birarda
862c788aec move payload adjustments to Packet 2015-07-23 15:27:32 -07:00
Stephen Birarda
19d0bf403c change NLPacket create signature for new headers 2015-07-23 14:06:10 -07:00
Stephen Birarda
9e7fb9ae16 shuffle Packet headers, use static enum for PacketType 2015-07-23 13:56:47 -07:00
Stephen Birarda
5bed3502ef fix order of ctors and assignment operators 2015-07-22 14:15:17 -07:00
Stephen Birarda
12e684bea1 fix identation for NLPacket move ctor 2015-07-22 11:21:31 -07:00
Stephen Birarda
8bf507dd24 add a sanity check for data NLPacket ctor 2015-07-22 11:06:13 -07:00
Stephen Birarda
1386aa57da repair to NLPacket creation from Packet and char* 2015-07-22 11:02:45 -07:00
Stephen Birarda
da761d4c95 fix static methods to handle header read/write 2015-07-21 12:12:15 -07:00
Stephen Birarda
ed6867e1a0 add a method to LNL to verify packets 2015-07-21 11:47:06 -07:00
Stephen Birarda
3901dbae33 fix for broken move in NLPacket/Packet 2015-07-21 11:06:25 -07:00
Stephen Birarda
796dfee687 udt namespace fixes and NLPacket operator fixes 2015-07-20 17:28:04 -07:00
Stephen Birarda
9556fecbe2 initial changes to make _nodeSocket a udt::Socket 2015-07-20 17:10:22 -07:00
Stephen Birarda
5f592df610 don't seek in Packet before open 2015-07-20 15:14:07 -07:00
Stephen Birarda
6fa17dafff open packets for write with ReadWrite 2015-07-15 18:27:43 -07:00
Stephen Birarda
312780a2f6 fix offset for source UUID and verification hash 2015-07-15 13:31:36 -07:00
Stephen Birarda
e90ace6231 fix child assignment UUID, adjust for NLPacket after unpack 2015-07-15 12:37:30 -07:00
Stephen Birarda
4a90e0f14f resolve conflicts on merge with clement/protcol 2015-07-15 11:45:17 -07:00
Atlante45
0b32a5d935 Write session uuid and connection hash in packet header 2015-07-15 11:42:35 -07:00
Stephen Birarda
e127c5c06d rename Packet methods for clarity 2015-07-15 10:40:40 -07:00
Stephen Birarda
88f419dfd7 repairs to packet sending/receiving 2015-07-14 18:59:33 -07:00
Stephen Birarda
3858e6933f open packets for reading and writing 2015-07-14 17:30:01 -07:00