From: Ian Jackson Date: Thu, 25 Jul 2013 17:30:52 +0000 (+0100) Subject: site: Check transform errors; factor out transform handling X-Git-Tag: debian/0.3.0_beta2~12 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/secnet/commitdiff_plain/0afd257e3beecf259a24a315d370b6d43db9fb44?hp=0afd257e3beecf259a24a315d370b6d43db9fb44 site: Check transform errors; factor out transform handling Make sure we always check the error return from transform->forwards and ->backwards. Otherwise logic errors in the site state machine might result in us sending out packets with unencrypted insider plaintext, or the like, due to the transform being unkeyed when we try to use it. Factor some repeated idioms for transform handling into a set of new functions. This will make the next patch much easier. We arrange to pass dispose_transform a pointer to the actual state variable where the transform is kept; this means that it can be changed to update that pointer. Signed-off-by: Ian Jackson ---