Merged SSL refactoring changing layer to use cipher layer