Moved streams related functions to xp_ssl.c