Add an error to the stack on failure in dtls1_write_bytes()