1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-18 06:04:06 +03:00

s4:librpc/rpc: 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:52:56 +01:00 committed by Andrew Bartlett
parent b8b874ef5e
commit 493d35a691

View File

@ -287,21 +287,13 @@ struct tevent_req *dcerpc_pipe_open_roh_send(struct dcecli_connection *conn,
/* Initialize TLS */ /* Initialize TLS */
if (use_tls) { if (use_tls) {
char *ca_file = lpcfg_tls_cafile(state, lp_ctx); status = tstream_tls_params_client_lpcfg(state->roh,
char *crl_file = lpcfg_tls_crlfile(state, lp_ctx); lp_ctx,
const char *tls_priority = lpcfg_tls_priority(lp_ctx); state->rpc_proxy,
enum tls_verify_peer_state verify_peer = &state->tls_params);
lpcfg_tls_verify_peer(lp_ctx);
status = tstream_tls_params_client(state->roh,
ca_file, crl_file,
tls_priority,
verify_peer,
state->rpc_proxy,
&state->tls_params);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("%s: Failed tstream_tls_params_client - %s\n", DBG_ERR("Failed tstream_tls_params_client_lpcfg - %s\n",
__func__, nt_errstr(status))); nt_errstr(status));
tevent_req_nterror(req, status); tevent_req_nterror(req, status);
return tevent_req_post(req, conn->event_ctx); return tevent_req_post(req, conn->event_ctx);
} }