How to set driverOptions to connect to MongoDB via TSL?

As it says in the title, I need to connect to my mongodb using TSL. I tried setting the driverOptions in my config.yaml file and setting ssl=true in my uri. This method doesn’t work. Any help is much appreciated. My attempt to set driverOptions is below.

server: mongodb://[user]:[pwd]@[host1]:[port],[host2]:[port]/[dbname]?replicaSet=[rsname]&ssl=true
options:
db: [dbname]
driverOptions:
pem_file: ~/[filename].pem
ca_file: ~/[filename].cert.pem
pem_pwd: [pwd]

I answered you on Github: https://github.com/agentejo/cockpit/issues/914