From 5be801c834566eb68854aaa0d27e4654ef88d880 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Thu, 29 Dec 2022 10:28:26 +0100 Subject: [PATCH 1/2] Refs #16622: Enable Secure Available BuiltinPoints for a PDPServer Signed-off-by: Mario Dominguez --- .../rtps/builtin/discovery/participant/PDPServer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp b/src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp index aec494360cb..13e50768aab 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp @@ -557,6 +557,16 @@ void PDPServer::initializeParticipantProxyData( | DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_DETECTOR | DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR | DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER; +#ifdef HAVE_SECURITY + if (getRTPSParticipant()->is_secure()) + { + participant_data->m_availableBuiltinEndpoints + |= DISC_BUILTIN_ENDPOINT_PUBLICATION_SECURE_ANNOUNCER + | DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_SECURE_DETECTOR + | DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_SECURE_ANNOUNCER + | DISC_BUILTIN_ENDPOINT_PUBLICATION_SECURE_DETECTOR; + } +#endif //HAVE_SECURITY const SimpleEDPAttributes& se = getRTPSParticipant()->getAttributes().builtin.discovery_config.m_simpleEDP; From a773492670df775a1706d01dfa7ecec5b667f7f8 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Tue, 3 Jan 2023 11:59:41 +0100 Subject: [PATCH 2/2] Revert "Refs #16603. Temporarily disabling secure endpoints on EDPClient." This reverts commit dead9c9224daf50970e61efb21c27c63e6d4d636. Signed-off-by: Mario Dominguez --- .../rtps/builtin/discovery/endpoint/EDPClient.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/cpp/rtps/builtin/discovery/endpoint/EDPClient.cpp b/src/cpp/rtps/builtin/discovery/endpoint/EDPClient.cpp index 10398dfa09b..5dbba385624 100644 --- a/src/cpp/rtps/builtin/discovery/endpoint/EDPClient.cpp +++ b/src/cpp/rtps/builtin/discovery/endpoint/EDPClient.cpp @@ -46,8 +46,7 @@ bool EDPClient::processLocalReaderProxyData( auto* writer = &subscriptions_writer_; -// TODO(Miguel C): Re-enable this when EDPServer creates the secure EDP endpoints -#if 0 // HAVE_SECURITY +#if HAVE_SECURITY if (local_reader->getAttributes().security_attributes().is_discovery_protected) { writer = &subscriptions_secure_writer_; @@ -80,8 +79,7 @@ bool EDPClient::processLocalWriterProxyData( auto* writer = &publications_writer_; - // TODO(Miguel C): Re-enable this when EDPServer creates the secure EDP endpoints -#if 0 //HAVE_SECURITY +#if HAVE_SECURITY if (local_writer->getAttributes().security_attributes().is_discovery_protected) { writer = &publications_secure_writer_; @@ -112,8 +110,7 @@ bool EDPClient::removeLocalWriter( auto* writer = &publications_writer_; - // TODO(Miguel C): Re-enable this when EDPServer creates the secure EDP endpoints -#if 0 // HAVE_SECURITY +#if HAVE_SECURITY if (W->getAttributes().security_attributes().is_discovery_protected) { writer = &publications_secure_writer_; @@ -166,8 +163,7 @@ bool EDPClient::removeLocalReader( auto* writer = &subscriptions_writer_; - // TODO(Miguel C): Re-enable this when EDPServer creates the secure EDP endpoints -#if 0 // HAVE_SECURITY +#if HAVE_SECURITY if (R->getAttributes().security_attributes().is_discovery_protected) { writer = &subscriptions_secure_writer_;