s4:librpc/rpc: make use of tstream_tls_params_client_lpcfg()
authorStefan Metzmacher <metze@samba.org>
Tue, 13 Feb 2024 15:52:56 +0000 (16:52 +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/librpc/rpc/dcerpc_roh.c

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