00001 /* 00002 * Distributed under the OpenDDS License. 00003 * See: http://www.OpenDDS.org/license.html 00004 */ 00005 00006 #ifndef DDS_DCPS_ACCESS_CONTROL_LOCAL_CREDENTIAL_DATA_H 00007 #define DDS_DCPS_ACCESS_CONTROL_LOCAL_CREDENTIAL_DATA_H 00008 00009 #include <string> 00010 00011 #include "dds/DCPS/security/SSL/Certificate.h" 00012 #include "dds/DCPS/security/SSL/SignedDocument.h" 00013 #include "dds/DdsSecurityCoreC.h" 00014 #include "dds/DdsDcpsCoreC.h" 00015 #include "dds/DCPS/RcObject.h" 00016 00017 namespace OpenDDS { 00018 namespace Security { 00019 00020 class LocalAccessCredentialData: public DCPS::RcObject { 00021 public: 00022 typedef DCPS::RcHandle<LocalAccessCredentialData> shared_ptr; 00023 00024 // LocalAccessCredentialData(const DDS::PropertySeq& props); 00025 00026 LocalAccessCredentialData(); 00027 00028 ~LocalAccessCredentialData(); 00029 00030 CORBA::Boolean load(const DDS::PropertySeq& props, 00031 ::DDS::Security::SecurityException& ex); 00032 00033 const SSL::Certificate& get_ca_cert() 00034 { 00035 return *ca_cert_; 00036 } 00037 00038 const SSL::SignedDocument& get_governance_doc() 00039 { 00040 return *governance_doc_; 00041 } 00042 00043 const SSL::SignedDocument& get_permissions_doc() 00044 { 00045 return *permissions_doc_; 00046 } 00047 00048 private: 00049 00050 SSL::Certificate::unique_ptr ca_cert_; 00051 SSL::SignedDocument::unique_ptr governance_doc_; 00052 SSL::SignedDocument::unique_ptr permissions_doc_; 00053 00054 std::string extract_file_name(const std::string& file_parm); 00055 ::CORBA::Boolean file_exists(const std::string& name); 00056 }; 00057 00058 } 00059 } 00060 00061 #endif