ssl_opts - what are the various options?
Can anyone please tell me what the various options for ssl_opts can be? I have a Production replica set that uses various SSL options in /etc/mongod.conf.

I get the following:
mix phx.server
Compiling 1 file (.ex)
[info] Running SecureProcessorWeb.Endpoint with Cowboy using http://0.0.0.0:14000
[info] ['TLS', 32, 'client', 58, 32, 73, 110, 32, 115, 116, 97, 116, 101, 32, 'hello', 32, 'received SERVER ALERT: Fatal - Handshake Failure', 10]
[info] ['TLS', 32, 'client', 58, 32, 73, 110, 32, 115, 116, 97, 116, 101, 32, 'hello', 32, 'received SERVER ALERT: Fatal - Handshake Failure', 10]
[info] ['TLS', 32, 'client', 58, 32, 73, 110, 32, 115, 116, 97, 116, 101, 32, 'hello', 32, 'received SERVER ALERT: Fatal - Handshake Failure', 10]
[error] Mongo.Protocol (#PID<0.317.0>) failed to connect: ** (Mongo.Error) ssl connect: TLS Alert: handshake failure - {:tls_alert, 'handshake failure'}
My connection works fine against a replica set without SSL but I can't turn that off on in Production. I can't seem to find ssl_opts documented anywhere (here or Google).

I may have gotten furthre by using the following (after checking erlang ssl docs):
[cacertfile: "/etc/ssl/ca.pem"],
[certfile: "/etc/ssl/mongodb.pem"],
[keyfile: "/etc/ssl/mongodb.pem"],
[tls_versions: ["tlsv1.2"]],
[verify_type: "verify_none"]]
resulting in 2018-08-30T19:00:07.489-0400 E NETWORK [conn21254] SSL: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher - not sure why SSL3 is being sent. Also tried specifying a list of ciphers to no avail.
You probably do not want to wrap each of those in its own list. you will probably want the following instead.
ssl_opts: [cacertfile: "...", certfile: "...", ...]
You may also want to double check some of your keys and values.
tls_versionsis not a valid key, I think you meantversionsverify_typeis not a valid key, I think you meantverify- "verify_none" is not a valid value, it should be an atom
["tlsv1.2"]is not avalid value, it should be a list of atoms ([:"tlsv1.2"])
Thank you for clarifying. I still get the SSL: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher error, unfortunately. My config now looks like:
ssl_opts: [
cacertfile: "/etc/ssl/ca.pem",
certfile: "/etc/ssl/mongodb.pem",
cipher: :"ECDHE-RSA-AES128-GCM-SHA256",
honor_cipher_order: true,
keyfile: "/etc/ssl/mongodb.pem",
server_renegotiate: true,
verify: :verify_none
versions: [:"tlsv1.2"]
]```
The cipher is what openssl says is supported with the cert. I've tried with and without that line (and the one following it).
Please reread the Erlang ssl module documentation. The key :cipher does not exist. It is :ciphers. And :"ECDHE-RSA-AES128-GCM-SHA256" is an invalid value.
Did you manage to solve this issue ? I am having exactly the same at the moment. Elixir version is 1.6 and OTP 21. Cheers.