Fix some issues found in review

Make sure to propagate errors from the packet handling and other
security-class routines.
I care less about clients crashing themselves than servers crashing
or things leaking secure data, in this review.

Change-Id: I70ae1df8a7bab216306d373122d2083fe53ec3cd