SecurityConfig.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #include "DCPS/DdsDcps_pch.h"
00009 #include "SecurityConfig.h"
00010
00011 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00012
00013 namespace OpenDDS {
00014 namespace Security {
00015
00016 SecurityConfig::SecurityConfig(const OPENDDS_STRING& name,
00017 Authentication_var authentication_plugin,
00018 AccessControl_var access_ctrl_plugin,
00019 CryptoKeyExchange_var key_exchange_plugin,
00020 CryptoKeyFactory_var key_factory_plugin,
00021 CryptoTransform_var transform_plugin,
00022 const ConfigPropertyList& properties)
00023 : name_(name)
00024 , authentication_plugin_(authentication_plugin)
00025 , access_control_plugin_(access_ctrl_plugin)
00026 , key_exchange_plugin_(key_exchange_plugin)
00027 , key_factory_plugin_(key_factory_plugin)
00028 , transform_plugin_(transform_plugin)
00029 , properties_(properties)
00030 {}
00031
00032 SecurityConfig::~SecurityConfig()
00033 {}
00034
00035 void SecurityConfig::get_properties(DDS::Security::PropertyQosPolicy& out_properties) const
00036 {
00037
00038
00039
00040
00041
00042 out_properties.value.length(static_cast<CORBA::ULong>(properties_.size()));
00043 CORBA::ULong index = 0;
00044 for (ConfigPropertyList::const_iterator iProp = properties_.begin();
00045 iProp != properties_.end();
00046 ++iProp) {
00047 DDS::Property_t& out_prop = out_properties.value[index++];
00048 out_prop.name = iProp->first.c_str();
00049 out_prop.value = iProp->second.c_str();
00050 }
00051 }
00052
00053 }
00054 }
00055
00056 OPENDDS_END_VERSIONED_NAMESPACE_DECL