Line data Source code
1 : /* 2 : * Distributed under the OpenDDS License. 3 : * See: http://www.OpenDDS.org/license.html 4 : */ 5 : 6 : #ifndef OPENDDS_DCPS_SECURITY_ACCESSCONTROL_LOCALACCESSCREDENTIALDATA_H 7 : #define OPENDDS_DCPS_SECURITY_ACCESSCONTROL_LOCALACCESSCREDENTIALDATA_H 8 : 9 : #include <string> 10 : 11 : #include "dds/DCPS/security/SSL/Certificate.h" 12 : #include "dds/DCPS/security/SSL/SignedDocument.h" 13 : #include "dds/DdsSecurityCoreC.h" 14 : #include "dds/DdsDcpsCoreC.h" 15 : #include "dds/DCPS/RcObject.h" 16 : 17 : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 18 : 19 : namespace OpenDDS { 20 : namespace Security { 21 : 22 : class LocalAccessCredentialData : public DCPS::RcObject { 23 : public: 24 : typedef DCPS::RcHandle<LocalAccessCredentialData> shared_ptr; 25 : 26 : LocalAccessCredentialData(); 27 : 28 : ~LocalAccessCredentialData(); 29 : 30 : bool load(const DDS::PropertySeq& props, DDS::Security::SecurityException& ex); 31 : bool verify(DDS::Security::SecurityException& ex); 32 : 33 6 : const SSL::Certificate& get_ca_cert() const 34 : { 35 6 : return *ca_cert_; 36 : } 37 : 38 22 : const SSL::SignedDocument& get_governance_doc() const 39 : { 40 22 : return governance_doc_; 41 : } 42 : 43 22 : const SSL::SignedDocument& get_permissions_doc() const 44 : { 45 22 : return permissions_doc_; 46 : } 47 : 48 : private: 49 : 50 : SSL::Certificate::unique_ptr ca_cert_; 51 : SSL::SignedDocument governance_doc_; 52 : SSL::SignedDocument permissions_doc_; 53 : }; 54 : 55 : } 56 : } 57 : 58 : OPENDDS_END_VERSIONED_NAMESPACE_DECL 59 : 60 : #endif