Set ssl handshake_done flag. Add logging.