Fix ssl connection handling and change plugin type to connection plugin.