ssl refactoring
ssl refactoring