Skip to content

Commit

Permalink
Refs #13521. Remove processing of endpoint properties.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany authored and JesusPoderoso committed Jun 20, 2023
1 parent c418ea0 commit dfb9960
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions src/cpp/rtps/security/SecurityManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2492,32 +2492,6 @@ bool SecurityManager::get_datawriter_sec_attributes(
returned_value = false;
}
}
else
{
// Get properties.
const std::string* property_value = PropertyPolicyHelper::find_property(writer_properties,
"rtps.endpoint.submessage_protection_kind");

if (property_value != nullptr && property_value->compare("ENCRYPT") == 0)
{
security_attributes.is_submessage_protected = true;
security_attributes.plugin_endpoint_attributes |=
PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_VALID |
PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_SUBMESSAGE_ENCRYPTED;
}

property_value = PropertyPolicyHelper::find_property(writer_properties,
"rtps.endpoint.payload_protection_kind");

if (property_value != nullptr && property_value->compare("ENCRYPT") == 0)
{
security_attributes.is_payload_protected = true;
security_attributes.is_key_protected = true;
security_attributes.plugin_endpoint_attributes |=
PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_VALID |
PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_PAYLOAD_ENCRYPTED;
}
}

return returned_value;
}
Expand Down Expand Up @@ -2700,32 +2674,6 @@ bool SecurityManager::get_datareader_sec_attributes(
returned_value = false;
}
}
else
{
// Get properties.
const std::string* property_value = PropertyPolicyHelper::find_property(reader_properties,
"rtps.endpoint.submessage_protection_kind");

if (property_value != nullptr && property_value->compare("ENCRYPT") == 0)
{
security_attributes.is_submessage_protected = true;
security_attributes.plugin_endpoint_attributes |=
PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_VALID |
PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_SUBMESSAGE_ENCRYPTED;
}

property_value = PropertyPolicyHelper::find_property(reader_properties,
"rtps.endpoint.payload_protection_kind");

if (property_value != nullptr && property_value->compare("ENCRYPT") == 0)
{
security_attributes.is_payload_protected = true;
security_attributes.is_key_protected = true;
security_attributes.plugin_endpoint_attributes |=
PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_VALID |
PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_PAYLOAD_ENCRYPTED;
}
}

return returned_value;
}
Expand Down

0 comments on commit dfb9960

Please sign in to comment.