| 2450 | } |
| 2451 | |
| 2452 | void configuration_impl::load_security(const configuration_element& _element) { |
| 2453 | |
| 2454 | try { |
| 2455 | auto its_security = _element.tree_.get_child_optional("security"); |
| 2456 | if (its_security) { |
| 2457 | is_security_enabled_ = true; |
| 2458 | is_security_external_ = its_security->empty(); |
| 2459 | |
| 2460 | auto its_audit_mode = its_security->get_child_optional("check_credentials"); |
| 2461 | if (its_audit_mode) { |
| 2462 | if (is_configured_[ET_SECURITY_AUDIT_MODE]) { |
| 2463 | VSOMEIP_WARNING << "Multiple definitions for security audit mode (check_credentials). Ignoring definition from " |
| 2464 | << _element.name_; |
| 2465 | } else { |
| 2466 | is_security_audit_ = (its_audit_mode->data() != "true"); |
| 2467 | is_configured_[ET_SECURITY_AUDIT_MODE] = true; |
| 2468 | } |
| 2469 | } |
| 2470 | |
| 2471 | auto its_remote_access = its_security->get_child_optional("allow_remote_clients"); |
| 2472 | if (its_remote_access) { |
| 2473 | if (is_configured_[ET_SECURITY_REMOTE_ACCESS]) { |
| 2474 | VSOMEIP_WARNING << "Multiple definitions for security audit mode (check_credentials). Ignoring definition from " |
| 2475 | << _element.name_; |
| 2476 | } else { |
| 2477 | is_remote_access_allowed_ = (its_remote_access->data() == "true"); |
| 2478 | is_configured_[ET_SECURITY_REMOTE_ACCESS] = true; |
| 2479 | } |
| 2480 | } |
| 2481 | } |
| 2482 | |
| 2483 | } catch (...) { |
| 2484 | // intentionally left empty |
| 2485 | } |
| 2486 | |
| 2487 | #ifndef VSOMEIP_DISABLE_SECURITY |
| 2488 | if (!is_security_external()) |
| 2489 | policy_manager_->load(_element); |
| 2490 | #endif // !VSOMEIP_DISABLE_SECURITY |
| 2491 | } |
| 2492 | |
| 2493 | void configuration_impl::load_selective_broadcasts_support(const configuration_element& _element) { |
| 2494 | try { |