Instead of using the :cacertfile use the :cacerts option.
cert1 = File.read!("path/to/cert1.pem") |> :public_key.pem_decode
cert2 = File.read!("path/to/cert2.pem") |> :public_key.pem_decode
cacerts = [cert1, cert2]
SSL in Erlang is the most confusing thing ever.


















