SSL reads and writes working