Really fix byte budget calculation.
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 29 Oct 2016 20:10:32 +0000 (22:10 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 29 Oct 2016 20:10:32 +0000 (22:10 +0200)
commit5c8a2a840a648b65b1396efbb0ddb84151ddc7e3
treee70dd3c5774c53f2b2bea0e06a95b08e91da574b
parent6af82260ba2d6bbf296932aa95dddec0be5abcbb
Really fix byte budget calculation.

We want to use the underlying cipher's block length, but if it's a stream
mode this will be 1. In that case, use the IV length. Ensure we never get
a budget that cannot be stored in a 64 bits integer.

Thanks to Wessel Dankers for helping getting this right.
src/protocol_auth.c