Merge pull request #4861 from owncloud/fix/ssl_handling