To reproduce, first start a mongod with ssl enabled:
$ mongod --sslMode requireSSL --sslPEMKeyFile jstests/libs/server.pem --sslCAFile jstests/libs/ca.pem
then run any tool using ssl
$ mongorestore test --ssl --sslPEMKeyFile=fake/path panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x8 pc=0x4b0114] goroutine 1 [running]: runtime.panic(0x7d67a0, 0xc72073) /gosrc/src/go/src/pkg/runtime/panic.c:278 +0xf5 gopkg.in/mgo%2ev2.DialWithInfo(0x0, 0xba, 0x0, 0x0) /mongo-tools/vendor/src/gopkg.in/mgo.v2/session.go:354 +0x44 github.com/mongodb/mongo-tools/common/db/openssl.(*SSLDBConnector).GetNewSession(0xc208046e80, 0xc8a400, 0x0, 0x0) /mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/common/db/openssl/openssl.go:71 +0x4d github.com/mongodb/mongo-tools/common/db.(*SessionProvider).GetSession(0xc208082fc0, 0x0, 0x0, 0x0) /mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/common/db/db.go:79 +0x165 github.com/mongodb/mongo-tools/common/db.(*SessionProvider).IsReplicaSet(0xc208082fc0, 0x8a4c00, 0x0, 0x0) /mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/common/db/command.go:87 +0x52 github.com/mongodb/mongo-tools/mongorestore.(*MongoRestore).ParseAndValidateOptions(0xc20805c6c0, 0x0, 0x0) /mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongorestore/mongorestore.go:86 +0x55d github.com/mongodb/mongo-tools/mongorestore.(*MongoRestore).Restore(0xc20805c6c0, 0x0, 0x0) /mongo-tools/.gopath/src/github.com/mongodb/mongo-tools/mongorestore/mongorestore.go:119 +0x4a main.main() /mongo-tools/mongorestore/main/mongorestore.go:56 +0x5da goroutine 4 [finalizer wait]: runtime.park(0x4261a0, 0xc88188, 0xc74ba7) /gosrc/src/go/src/pkg/runtime/proc.c:1406 +0x97 runtime.parkunlock(0xc88188, 0xc74ba7) /gosrc/src/go/src/pkg/runtime/proc.c:1422 +0x3b runfinq() /gosrc/src/go/src/pkg/runtime/mgc0.c:1645 +0xcf runtime.goexit() /gosrc/src/go/src/pkg/runtime/proc.c:1475 goroutine 5 [syscall]: os/signal.loop() /gosrc/src/go/src/pkg/os/signal/signal_unix.go:21 +0x1e created by os/signal.init·1 /gosrc/src/go/src/pkg/os/signal/signal_unix.go:27 +0x32 goroutine 17 [syscall, locked to thread]: runtime.goexit() /gosrc/src/go/src/pkg/runtime/proc.c:1475 $