diff --git a/src/cpp/rtps/security/SecurityManager.cpp b/src/cpp/rtps/security/SecurityManager.cpp index c1bab35c052..44cad5b1afa 100644 --- a/src/cpp/rtps/security/SecurityManager.cpp +++ b/src/cpp/rtps/security/SecurityManager.cpp @@ -728,6 +728,40 @@ void SecurityManager::remove_participant( { SecurityException exception; + for (auto& local_reader : reader_handles_) + { + for (auto wit = local_reader.second.associated_writers.begin(); + local_reader.second.associated_writers.end() != wit; + ) + { + if (wit->first.guidPrefix == participant_data.m_guid.guidPrefix) + { + wit = local_reader.second.associated_writers.erase(wit); + } + else + { + ++wit; + } + } + } + + for (auto& local_writer : writer_handles_) + { + for (auto rit = local_writer.second.associated_readers.begin(); + local_writer.second.associated_readers.end() != rit; + ) + { + if (rit->first.guidPrefix == participant_data.m_guid.guidPrefix) + { + rit = local_writer.second.associated_readers.erase(rit); + } + else + { + ++rit; + } + } + } + ParticipantCryptoHandle* participant_crypto_handle = dp_it->second.get_participant_crypto(); if (participant_crypto_handle != nullptr) diff --git a/test/blackbox/XFAIL_DDS_PIM_SECURITY.list b/test/blackbox/XFAIL_DDS_PIM_SECURITY.list index 894e7b2516f..e69de29bb2d 100644 --- a/test/blackbox/XFAIL_DDS_PIM_SECURITY.list +++ b/test/blackbox/XFAIL_DDS_PIM_SECURITY.list @@ -1,25 +0,0 @@ -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_governance_rule_order.Intraprocess -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_governance_rule_order.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_Permissions_validation_fail_on_partition_wildcards.Intraprocess -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_Permissions_validation_fail_on_partition_wildcards.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_Permissions_validation_fail_on_topic_wildcards.Intraprocess -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_Permissions_validation_fail_on_topic_wildcards.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessNone_validation_ok_enable_discovery_disable_access_encrypt.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryDisableAccessNone_validation_ok_enable_discovery_enable_access_encrypt.Intraprocess -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsDisableDiscoveryEnableAccessEncrypt_validation_ok_enable_discovery_disable_access_encrypt.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_disable_access_encrypt.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryDisableAccessEncrypt_validation_ok_enable_discovery_enable_access_encrypt.Intraprocess -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryDisableAccessNone_validation_ok_enable_discovery_disable_access_encrypt.Intraprocess -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryDisableAccessNone_validation_ok_enable_discovery_disable_access_encrypt.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryDisableAccessNone_validation_ok_enable_discovery_disable_access_none.Intraprocess -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryDisableAccessNone_validation_ok_enable_discovery_enable_access_encrypt.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessEncrypt_validation_ok_disable_discovery_disable_access_encrypt.Intraprocess -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessEncrypt_validation_ok_disable_discovery_enable_access_encrypt.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessEncrypt_validation_ok_enable_discovery_disable_access_encrypt.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessEncrypt_validation_ok_enable_discovery_enable_access_encrypt.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessEncrypt_validation_ok_enable_discovery_enable_access_none.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessNone_validation_ok_disable_discovery_disable_access_encrypt.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessNone_validation_ok_enable_discovery_enable_access_encrypt.Intraprocess -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessNone_validation_ok_enable_discovery_enable_access_encrypt.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessNone_validation_ok_enable_discovery_enable_access_none.Transport -BlackboxTests_DDS_PIM.Security.BuiltinAuthenticationAndCryptoPlugin_reliable_all_ok.Transport