1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-10 12:58:35 +03:00

s4:libcli/ldap: make use of tstream_tls_params_client_lpcfg()

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>
This commit is contained in:
Stefan Metzmacher 2024-02-13 16:53:15 +01:00 committed by Andrew Bartlett
parent 493d35a691
commit c200cf1b5f

View 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;