MongoClientSettings.authenticateSSL

void authenticateSSL(string username, string sslPEMKeyFile, string sslCAFile = null) @safe

Sets ssl, the username, the PEM key file and the trusted CA file in this MongoClientSettings instance.

Parameters

usernameThe username as provided in the cert file like "C=IS,ST=Reykjavik,L=Reykjavik,O=MongoDB,OU=Drivers,CN=client". The username can be blank if connecting to MongoDB 3.4 or above.
sslPEMKeyFilePath to a certificate with private key and certificate chain to connect with.
sslCAFileOptional path to a trusted certificate authority file for verifying the remote certificate.