Fix ssl usage and allow to configure it