Suggested fix to support client-certificates when connecting to gem server

this commit fixes #547