s4:libcli/ldap: make use of tstream_tls_params_client_lpcfg()
authorStefan Metzmacher <metze@samba.org>
Tue, 13 Feb 2024 15:53:15 +0000 (16:53 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Apr 2024 23:50:33 +0000 (23:50 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15621

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/libcli/ldap/ldap_client.c

index 3c9f91601e697fa41e51b4502384a25f16805834..61a49d345028b5adab3b75dc9c15908d09366c16 100644 (file)
@@ -510,20 +510,12 @@ _PUBLIC_ struct composite_context *ldap_connect_send(struct ldap_connection *con
                conn->port = port;
 
                if (conn->ldaps) {
-                       char *ca_file = lpcfg_tls_cafile(state, conn->lp_ctx);
-                       char *crl_file = lpcfg_tls_crlfile(state, conn->lp_ctx);
-                       const char *tls_priority = lpcfg_tls_priority(conn->lp_ctx);
-                       enum tls_verify_peer_state verify_peer =
-                               lpcfg_tls_verify_peer(conn->lp_ctx);
                        NTSTATUS status;
 
-                       status = tstream_tls_params_client(state,
-                                                          ca_file,
-                                                          crl_file,
-                                                          tls_priority,
-                                                          verify_peer,
-                                                          conn->host,
-                                                          &state->tls_params);
+                       status = tstream_tls_params_client_lpcfg(state,
+                                                                conn->lp_ctx,
+                                                                conn->host,
+                                                                &state->tls_params);
                        if (!NT_STATUS_IS_OK(status)) {
                                composite_error(result, status);
                                return result;