Implemented logic to get the next available port for SSL port