Skip to content

Commit 1d20be3

Browse files
authored
Fix SNI for join address (#7622)
1 parent 3957892 commit 1d20be3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/node/node_state.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -656,11 +656,14 @@ namespace ccf
656656
auto network_ca = std::make_shared<::tls::CA>(std::string(
657657
config.join.service_cert.begin(), config.join.service_cert.end()));
658658

659+
auto [target_host, target_port] =
660+
split_net_address(config.join.target_rpc_address);
661+
659662
auto join_client_cert = std::make_unique<::tls::Cert>(
660663
network_ca,
661664
self_signed_node_cert,
662665
node_sign_kp->private_key_pem(),
663-
config.join.target_rpc_address);
666+
target_host);
664667

665668
// Create RPC client and connect to remote node
666669
// Note: For now, assume that target node accepts same application
@@ -669,9 +672,6 @@ namespace ccf
669672
std::move(join_client_cert),
670673
rpcsessions->get_app_protocol_main_interface());
671674

672-
auto [target_host, target_port] =
673-
split_net_address(config.join.target_rpc_address);
674-
675675
join_client->connect(
676676
target_host,
677677
target_port,

0 commit comments

Comments
 (0)