Skip to content

Commit

Permalink
Secure EDP exchange (#3181)
Browse files Browse the repository at this point in the history
* Refs #16622: Enable Secure Available BuiltinPoints for a PDPServer

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Revert "Refs #16603. Temporarily disabling secure endpoints on EDPClient."

This reverts commit dead9c9.

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
  • Loading branch information
Mario-DL authored and MiguelCompany committed Feb 8, 2023
1 parent dd88764 commit 1549f5f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/cpp/rtps/builtin/discovery/endpoint/EDPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down Expand Up @@ -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_;
Expand Down Expand Up @@ -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_;
Expand Down Expand Up @@ -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_;
Expand Down
10 changes: 10 additions & 0 deletions src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1549f5f

Please sign in to comment.