Server: fixes for ssl