Classic protocol and crypto cleanups.

ugh - no, it's more complicated (even after I've edited what I wrote before).
Nothing takes care of key, though.
There's a use of newkey below, but no sign of it being RSA_free()d.