SecurityConfig.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef OPENDDS_DCPS_SECURTIY_CONFIG_H
00009 #define OPENDDS_DCPS_SECURTIY_CONFIG_H
00010
00011 #include <ace/config.h>
00012 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00013 #pragma once
00014 #endif
00015
00016 #include "dds/DCPS/dcps_export.h"
00017 #include "dds/DdsSecurityCoreC.h"
00018 #include "dds/DCPS/RcObject.h"
00019 #include "dds/DCPS/security/framework/SecurityConfigPropertyList.h"
00020 #include "ace/Synch_Traits.h"
00021
00022 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00023
00024 namespace OpenDDS {
00025 namespace Security {
00026
00027 using DDS::Security::Authentication_var;
00028 using DDS::Security::AccessControl_var;
00029 using DDS::Security::CryptoKeyExchange_var;
00030 using DDS::Security::CryptoKeyFactory_var;
00031 using DDS::Security::CryptoTransform_var;
00032
00033 class OpenDDS_Dcps_Export SecurityConfig : public DCPS::RcObject {
00034 public:
00035
00036 OPENDDS_STRING name() const
00037 {
00038 return name_;
00039 }
00040
00041
00042 Authentication_var get_authentication() const
00043 {
00044 return authentication_plugin_;
00045 }
00046
00047 AccessControl_var get_access_control() const
00048 {
00049 return access_control_plugin_;
00050 }
00051
00052 CryptoKeyExchange_var get_crypto_key_exchange() const
00053 {
00054 return key_exchange_plugin_;
00055 }
00056
00057 CryptoKeyFactory_var get_crypto_key_factory() const
00058 {
00059 return key_factory_plugin_;
00060 }
00061
00062 CryptoTransform_var get_crypto_transform() const
00063 {
00064 return transform_plugin_;
00065 }
00066
00067 void get_properties(DDS::Security::PropertyQosPolicy& properties) const;
00068
00069 SecurityConfig(const OPENDDS_STRING& name,
00070 Authentication_var authentication_plugin,
00071 AccessControl_var access_ctrl_plugin,
00072 CryptoKeyExchange_var key_exchange_plugin,
00073 CryptoKeyFactory_var key_factory_plugin,
00074 CryptoTransform_var transform_plugin,
00075 const ConfigPropertyList& properties);
00076
00077 private:
00078 friend class SecurityRegistry;
00079
00080 template <typename T, typename U>
00081 friend DCPS::RcHandle<T> DCPS::make_rch(U const&);
00082
00083 ~SecurityConfig();
00084
00085 const OPENDDS_STRING name_;
00086 Authentication_var authentication_plugin_;
00087 AccessControl_var access_control_plugin_;
00088 CryptoKeyExchange_var key_exchange_plugin_;
00089 CryptoKeyFactory_var key_factory_plugin_;
00090 CryptoTransform_var transform_plugin_;
00091 ConfigPropertyList properties_;
00092
00093 };
00094
00095 }
00096 }
00097
00098 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00099
00100 #endif