mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
s3:rpc_server/mdssvc: 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:
parent
604413b98a
commit
b8b874ef5e
@ -29,6 +29,7 @@
|
|||||||
#include "mdssvc.h"
|
#include "mdssvc.h"
|
||||||
#include "mdssvc_es.h"
|
#include "mdssvc_es.h"
|
||||||
#include "rpc_server/mdssvc/es_parser.tab.h"
|
#include "rpc_server/mdssvc/es_parser.tab.h"
|
||||||
|
#include "lib/param/param.h"
|
||||||
|
|
||||||
#include <jansson.h>
|
#include <jansson.h>
|
||||||
|
|
||||||
@ -246,18 +247,18 @@ static struct tevent_req *mds_es_connect_send(
|
|||||||
use_tls ? "S" : "", state->server_addr, state->server_port);
|
use_tls ? "S" : "", state->server_addr, state->server_port);
|
||||||
|
|
||||||
if (use_tls) {
|
if (use_tls) {
|
||||||
const char *ca_file = lp__tls_cafile();
|
struct loadparm_context *lp_ctx = NULL;
|
||||||
const char *crl_file = lp__tls_crlfile();
|
|
||||||
const char *tls_priority = lp_tls_priority();
|
|
||||||
enum tls_verify_peer_state verify_peer = lp_tls_verify_peer();
|
|
||||||
|
|
||||||
status = tstream_tls_params_client(state,
|
lp_ctx = loadparm_init_s3(state, loadparm_s3_helpers());
|
||||||
ca_file,
|
if (tevent_req_nomem(lp_ctx, req)) {
|
||||||
crl_file,
|
return tevent_req_post(req, ev);
|
||||||
tls_priority,
|
}
|
||||||
verify_peer,
|
|
||||||
state->server_addr,
|
status = tstream_tls_params_client_lpcfg(state,
|
||||||
&state->tls_params);
|
lp_ctx,
|
||||||
|
state->server_addr,
|
||||||
|
&state->tls_params);
|
||||||
|
TALLOC_FREE(lp_ctx);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
DBG_ERR("Failed tstream_tls_params_client - %s\n",
|
DBG_ERR("Failed tstream_tls_params_client - %s\n",
|
||||||
nt_errstr(status));
|
nt_errstr(status));
|
||||||
|
Loading…
Reference in New Issue
Block a user