simplify error_code handling for handshake and write
simplify error_code handling for handshake and write

randombit/botan,randombit/botan,randombit/botan,randombit/botan,randombit/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan