state_machine_set_SSL(&item->sm, SSL_new(world->ssl_ctx), world->server_mode);
SSL_set_app_data(new_ssl, NULL); if(!state_machine_set_SSL(&item->sm, new_ssl, world->server_mode)) goto err;
static int tunala_world_new_item(tunala_world_t *world, int fd,		const unsigned char *ip, unsigned short port){	tunala_item_t *item;	int newfd;	if(!tunala_world_make_room(world))		return 0;	item = world->tunnels + (world->tunnels_used++);	state_machine_init(&item->sm);	item->clean_read = item->clean_send =		item->dirty_read = item->dirty_send = -1;	if((newfd = ip_create_connection_split(ip, port)) == -1)		goto err;	/* Which way round? If we're a server, "fd" is the dirty side and the	 * connection we open is the clean one. For a client, it's the other way	 * around. */	if(world->server_mode) {		item->dirty_read = item->dirty_send = fd;		item->clean_read = item->clean_send = newfd;	} else {		item->clean_read = item->clean_send = fd;		item->dirty_read = item->dirty_send = newfd;	}	state_machine_set_SSL(&item->sm, SSL_new(world->ssl_ctx),			world->server_mode);	return 1;err:	state_machine_close(&item->sm);	return 0;}