@@ -133,24 +133,36 @@ get_http_options_multiple_options(_) ->
133133 } = maps :get (http_options , Settings , undefined ).
134134
135135tls_basic_options (_ ) ->
136- BasicOptions = ldclient_config :tls_basic_options (),
137- case os :type () of
138- {unix , linux } ->
139- [
140- {cacertfile , " /etc/ssl/certs/ca-certificates.crt" },
141- {verify , verify_peer },
142- {ciphers , Ciphers },
143- {depth , 3 },
144- {customize_hostname_check , _ }] = BasicOptions ,
145- true = (length (Ciphers ) =/= 0 );
146- {_ , _ } ->
147- [
148- {cacerts , _ },
149- {verify , verify_peer },
150- {ciphers , Ciphers },
151- {depth , 3 },
152- {customize_hostname_check , _ }] = BasicOptions ,
153- true = (length (Ciphers ) =/= 0 )
136+ case erlang :list_to_integer (erlang :system_info (otp_release )) >= 25 of
137+ true ->
138+ BasicOptions = ldclient_config :tls_basic_options (),
139+ CaCerts = public_key :cacerts_get (),
140+ [{cacerts , CaCerts },
141+ {verify , verify_peer },
142+ {ciphers , Ciphers },
143+ {depth , 3 },
144+ {customize_hostname_check , _ }] = BasicOptions ,
145+ true = (length (Ciphers ) =/= 0 );
146+ false ->
147+ BasicOptions = ldclient_config :tls_basic_options (),
148+ case os :type () of
149+ {unix , linux } ->
150+ [
151+ {cacertfile , " /etc/ssl/certs/ca-certificates.crt" },
152+ {verify , verify_peer },
153+ {ciphers , Ciphers },
154+ {depth , 3 },
155+ {customize_hostname_check , _ }] = BasicOptions ,
156+ true = (length (Ciphers ) =/= 0 );
157+ {_ , _ } ->
158+ [
159+ {cacerts , _ },
160+ {verify , verify_peer },
161+ {ciphers , Ciphers },
162+ {depth , 3 },
163+ {customize_hostname_check , _ }] = BasicOptions ,
164+ true = (length (Ciphers ) =/= 0 )
165+ end
154166 end .
155167
156168tls_with_ca_certfile_options (_ ) ->
0 commit comments