C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
OpcUa::TrustListType Class Reference

Class implementing the UaObject interface for the TrustListType. More...

#include <opcua_trustlisttype.h>

Inherits OpcUa::TrustListTypeBase.

Public Member Functions

 TrustListType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Construction of the class TrustListType. More...
 
 TrustListType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Construction of the class TrustListType. More...
 
 TrustListType (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an instance of the class TrustListType with all components. More...
 
void setCallback (TrustListTypeCallback *pCallback)
 Set trust list instance specific callback interface to get informed about TrustList updates.
 
void setTrustListConfiguration (OpcUa_UInt32 nMaxTrustListSize, const UaString &sCertificateRevocationListLocation, const UaString &sCertificateTrustListLocation, const UaString &sIssuersRevocationListLocation, const UaString &sIssuersCertificatesLocation)
 Sets the path strings and size for the trust list directories. More...
 
virtual UaStatus Open (const ServiceContext &serviceContext, OpcUa_Byte Mode, OpcUa_UInt32 &FileHandle)
 Opens a file represented by an Object of FileType. More...
 
virtual UaStatus Close (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle)
 Closes a file represented by a FileType. More...
 
virtual UaStatus AddCertificate (const ServiceContext &serviceContext, UaByteString &Certificate, OpcUa_Boolean IsTrustedCertificate)
 Allows a Client to add a single certificate to the trust list. More...
 
virtual UaStatus CloseAndUpdate (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle, OpcUa_Boolean &ApplyChangesRequired)
 Closes the file and applies the changes to the trust list. More...
 
virtual UaStatus OpenWithMasks (const ServiceContext &serviceContext, OpcUa_UInt32 Masks, OpcUa_UInt32 &FileHandle)
 Allows a Client to read only the portion of the trust list. More...
 
virtual UaStatus RemoveCertificate (const ServiceContext &serviceContext, const UaString &Thumbprint, OpcUa_Boolean IsTrustedCertificate)
 Allows a Client to remove a single certificate from the trust list. More...
 
void setCertificateManagementSettings (bool allowTrustListUpdate)
 Set trust list management settings. More...
 
void getCertificateManagementSettings (bool &allowTrustListUpdate)
 Get trust list management settings. More...
 
- Public Member Functions inherited from OpcUa::TrustListTypeBase
 TrustListTypeBase (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an TrustListType object using an instance declaration node as base.
 
 TrustListTypeBase (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an TrustListType object.
 
 TrustListTypeBase (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an instance of the class TrustListTypeBase with all components. More...
 
virtual UaNodeId typeDefinitionId () const
 Returns the type definition NodeId for the TrustListType.
 
virtual UaStatus beginCall (MethodManagerCallback *pCallback, const ServiceContext &serviceContext, OpcUa_UInt32 callbackHandle, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments)
 Call method of an UA object. More...
 
virtual UaStatus call (const ServiceContext &serviceContext, MethodHandle *pMethodHandle, const UaVariantArray &inputArguments, UaVariantArray &outputArguments, UaStatusCodeArray &inputArgumentResults, UaDiagnosticInfos &inputArgumentDiag)
 Synchronous version of the MethodManager method call executed in a worker thread.
 
virtual void setLastUpdateTime (const UaDateTime &LastUpdateTime)
 Sets the LastUpdateTime value. More...
 
virtual UaDateTime getLastUpdateTime () const
 Returns the value of LastUpdateTime. More...
 
virtual void setUpdateFrequency (OpcUa_Double UpdateFrequency)
 Sets the UpdateFrequency value. More...
 
virtual OpcUa_Double getUpdateFrequency () const
 Returns the value of UpdateFrequency. More...
 
virtual OpcUa::PropertyTypegetLastUpdateTimeNode ()
 Returns the LastUpdateTime node. More...
 
virtual const OpcUa::PropertyTypegetLastUpdateTimeNode () const
 Returns the LastUpdateTime node. More...
 
virtual OpcUa::PropertyTypegetUpdateFrequencyNode ()
 Returns the UpdateFrequency node. More...
 
virtual const OpcUa::PropertyTypegetUpdateFrequencyNode () const
 Returns the UpdateFrequency node. More...
 
virtual OpcUa::BaseMethodgetAddCertificate ()
 Returns the AddCertificate node. More...
 
virtual const OpcUa::BaseMethodgetAddCertificate () const
 Returns the AddCertificate node. More...
 
virtual OpcUa::BaseMethodgetCloseAndUpdate ()
 Returns the CloseAndUpdate node. More...
 
virtual const OpcUa::BaseMethodgetCloseAndUpdate () const
 Returns the CloseAndUpdate node. More...
 
virtual OpcUa::BaseMethodgetOpenWithMasks ()
 Returns the OpenWithMasks node.
 
virtual const OpcUa::BaseMethodgetOpenWithMasks () const
 Returns the OpenWithMasks node.
 
virtual OpcUa::BaseMethodgetRemoveCertificate ()
 Returns the RemoveCertificate node. More...
 
virtual const OpcUa::BaseMethodgetRemoveCertificate () const
 Returns the RemoveCertificate node. More...
 
virtual void useAccessInfoFromType ()
 Applies the NodeAccessInfo set at the TrustListTypeBase and its children. More...
 
void useAccessInfoFromInstance (TrustListTypeBase *pInstance)
 Uses the NodeAccessInfo of pOther and its children. More...
 
- Public Member Functions inherited from OpcUa::FileType
 FileType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL, OpcUa_UInt32 clientProcessingTimeout=0)
 Construction of the class FileType. More...
 
 FileType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL, OpcUa_UInt32 clientProcessingTimeout=0)
 Construction of the class FileType. More...
 
 FileType (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL, OpcUa_UInt32 clientProcessingTimeout=0)
 Constructs an instance of the class FileType with all components. More...
 
virtual void setInvalid ()
 Set the file object invalid. More...
 
UaString filePath () const
 Get the file path and name used for this FileType object.
 
bool setFilePath (const UaString &sFilePath)
 Set file path and name used for FileType object. More...
 
OpcUa_UInt64 maxFileSize () const
 Get maximum file size accepted for writing. More...
 
void setMaxFileSize (OpcUa_UInt64 maxFileSize)
 Set the maximum file size accepted for writing. More...
 
virtual UaStatus GetPosition (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle, OpcUa_UInt64 &Position)
 Provides the current position of the FileHandle. More...
 
virtual UaStatus Read (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle, OpcUa_Int32 Length, UaByteString &Data)
 Reads a part of the file starting from the current file position. More...
 
virtual UaStatus SetPosition (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle, OpcUa_UInt64 Position)
 Sets the current position of the FileHandle. More...
 
virtual UaStatus Write (const ServiceContext &serviceContext, OpcUa_UInt32 FileHandle, UaByteString &Data)
 Writes a part of the file starting from the current file position. More...
 
OpcUa_UInt32 getClientProcessingTimeout () const
 Return the maximum time in milliseconds a client can keep a file open without working on it. More...
 
void setClientProcessingTimeout (OpcUa_UInt32 milliseconds)
 Set the maximum time in milliseconds a client can keep a file open without working on it. More...
 
void checkTimeout ()
 Check the timeout of open file handles and close the handles if timed out.
 
- Public Member Functions inherited from OpcUa::FileTypeBase
 FileTypeBase (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an FileType object using an instance declaration node as base.
 
 FileTypeBase (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an FileType object.
 
 FileTypeBase (UaBase::Object *pBaseNode, XmlUaNodeFactoryManager *pFactory, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Constructs an instance of the class FileTypeBase with all components. More...
 
virtual void setMimeType (const UaString &MimeType)
 Sets the MimeType value. More...
 
virtual UaString getMimeType () const
 Returns the value of MimeType. More...
 
virtual void setOpenCount (OpcUa_UInt16 OpenCount)
 Sets the OpenCount value. More...
 
virtual OpcUa_UInt16 getOpenCount () const
 Returns the value of OpenCount. More...
 
virtual void setSize (OpcUa_UInt64 Size)
 Sets the Size value. More...
 
virtual OpcUa_UInt64 getSize () const
 Returns the value of Size. More...
 
virtual void setUserWritable (OpcUa_Boolean UserWritable)
 Sets the UserWritable value. More...
 
virtual OpcUa_Boolean getUserWritable () const
 Returns the value of UserWritable. More...
 
virtual void setWritable (OpcUa_Boolean Writable)
 Sets the Writable value. More...
 
virtual OpcUa_Boolean getWritable () const
 Returns the value of Writable. More...
 
virtual OpcUa::PropertyTypegetMimeTypeNode ()
 Returns the MimeType node. More...
 
virtual const OpcUa::PropertyTypegetMimeTypeNode () const
 Returns the MimeType node. More...
 
virtual OpcUa::PropertyTypegetOpenCountNode ()
 Returns the OpenCount node. More...
 
virtual const OpcUa::PropertyTypegetOpenCountNode () const
 Returns the OpenCount node. More...
 
virtual OpcUa::PropertyTypegetSizeNode ()
 Returns the Size node. More...
 
virtual const OpcUa::PropertyTypegetSizeNode () const
 Returns the Size node. More...
 
virtual OpcUa::PropertyTypegetUserWritableNode ()
 Returns the UserWritable node. More...
 
virtual const OpcUa::PropertyTypegetUserWritableNode () const
 Returns the UserWritable node. More...
 
virtual OpcUa::PropertyTypegetWritableNode ()
 Returns the Writable node. More...
 
virtual const OpcUa::PropertyTypegetWritableNode () const
 Returns the Writable node. More...
 
virtual OpcUa::BaseMethodgetClose ()
 Returns the Close node.
 
virtual const OpcUa::BaseMethodgetClose () const
 Returns the Close node.
 
virtual OpcUa::BaseMethodgetGetPosition ()
 Returns the GetPosition node.
 
virtual const OpcUa::BaseMethodgetGetPosition () const
 Returns the GetPosition node.
 
virtual OpcUa::BaseMethodgetOpen ()
 Returns the Open node.
 
virtual const OpcUa::BaseMethodgetOpen () const
 Returns the Open node.
 
virtual OpcUa::BaseMethodgetRead ()
 Returns the Read node.
 
virtual const OpcUa::BaseMethodgetRead () const
 Returns the Read node.
 
virtual OpcUa::BaseMethodgetSetPosition ()
 Returns the SetPosition node.
 
virtual const OpcUa::BaseMethodgetSetPosition () const
 Returns the SetPosition node.
 
virtual OpcUa::BaseMethodgetWrite ()
 Returns the Write node.
 
virtual const OpcUa::BaseMethodgetWrite () const
 Returns the Write node.
 
void useAccessInfoFromInstance (FileTypeBase *pInstance)
 Uses the NodeAccessInfo of pOther and its children. More...
 
- Public Member Functions inherited from OpcUa::BaseObjectType
 BaseObjectType (const UaNodeId &nodeId, UaObject *pInstanceDeclarationObject, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Construction of the class BaseObjectType. More...
 
 BaseObjectType (const UaNodeId &nodeId, const UaString &name, OpcUa_UInt16 browseNameNameSpaceIndex, NodeManagerConfig *pNodeConfig, UaMutexRefCounted *pSharedMutex=NULL)
 Construction of the class BaseObjectType. More...
 
UaReferenceListsgetUaReferenceLists () const
 Get the UaReferenceLists interface for the node. More...
 
virtual UaStatus browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)
 Discover the references of a specified node of a view. More...
 
UaNodeId nodeId () const
 Get the NodeId of the current Node. More...
 
virtual UaQualifiedName browseName () const
 Get the browseName of the current Node. More...
 
virtual UaLocalizedText displayName (Session *pSession) const
 Get the displayName as LocalizedText of the current Node. More...
 
virtual OpcUa_Boolean isDescriptionSupported () const
 Check if Node is DescriptionSupported. More...
 
virtual UaLocalizedText description (Session *pSession) const
 Get the description as LocalizedText of the current Node. More...
 
virtual OpcUa_Boolean isWriteMaskSupported () const
 Check if Node is WriteMaskSupported. More...
 
virtual OpcUa_UInt32 writeMask () const
 Get the writeMask of the current Node. More...
 
virtual OpcUa_Boolean isUserWriteMaskSupported () const
 Check if Node is UserWriteMaskSupported. More...
 
virtual OpcUa_UInt32 userWriteMask (Session *pSession) const
 Check if Node has a userWriteMask. More...
 
UaNodegetUaNode () const
 Get the UaNode interface pointer of this node. More...
 
virtual OpcUa_Byte eventNotifier () const
 Returns the EventNotifier for the BaseObjectType. More...
 
virtual MethodManagergetMethodManager (UaMethod *pMethod) const
 Returns the method manager interface for the BaseObjectType instance. More...
 
virtual void setUserData (UserDataBase *pUserData)
 Method to set user data stored in this class. More...
 
virtual UserDataBasegetUserData () const
 Method to get the user data stored in this class. More...
 
virtual void setBrowseName (const UaQualifiedName &browseName)
 Sets the browse name attribute value. More...
 
virtual void setDisplayName (const UaLocalizedText &displayName)
 Sets the display name attribute value. More...
 
virtual void setDescription (const UaLocalizedText &description)
 Sets the description attribute value. More...
 
virtual void setWriteMask (OpcUa_UInt32 writeMask)
 Sets the write mask attribute value. More...
 
virtual void setEventNotifier (OpcUa_Byte eventNotifier)
 Sets the eventNotifier attribute value. More...
 
virtual void setModellingRuleId (const UaNodeId &modellingRuleId)
 Set NodeId of the modeling rule for this node. More...
 
virtual UaNodeId modellingRuleId () const
 Get NodeId of the modeling rule for this node. More...
 
void setMethodManager (MethodManager *pMethodManager)
 Allows a class aggregating the object to implement the MethodManager for this object. More...
 
virtual UaStatus setAttributeValue (Session *pSession, OpcUa_Int32 attributeId, const UaDataValue &dataValue, NodeAccessInfo *pDefaultPermissions, OpcUa_Boolean checkWriteMask)
 Sets the value of an attribute of the Node. More...
 
- Public Member Functions inherited from MethodManager
 MethodManager ()
 construction
 
virtual ~MethodManager ()
 destruction
 
- Public Member Functions inherited from UaObject
 UaObject (UaMutexRefCounted *pSharedMutex=NULL)
 Construction of the UaObject. More...
 
OpcUa_NodeClass nodeClass () const
 Get the node class of the Node. More...
 
virtual void getAttributeValue (Session *pSession, OpcUa_Int32 attributeId, NodeAccessInfo *pDefaultPermissions, UaDataValue &uaDataValue)
 Gets the value of an attribute of the Node. More...
 
- Public Member Functions inherited from UaNode
 UaNode (UaMutexRefCounted *pSharedMutex=NULL)
 Construction of the UaNode. More...
 
virtual UaNodeId getKey () const
 Get the key of the node used for the hash table. More...
 
virtual NodeAccessInfogetAccessInfo () const
 Returns the access info for this node. More...
 
virtual bool hasAccessInfo () const
 Check if this UaNode has a NodeAccessInfo assigned. More...
 
virtual void useAccessInfoFrom (const UaNode *pOther)
 Set the NodeAccessInfo from another node to this node. More...
 
virtual void setAccessInfo (NodeAccessInfo *pAccessInfo)
 Set the NodeAccessInfo for this node. More...
 
virtual void attachAccessInfo (NodeAccessInfo *pAccessInfo)
 Set the NodeAccessInfo for this node. More...
 
- Public Member Functions inherited from ChainEntry
 ChainEntry ()
 construction
 
ChainEntryfind (const UaNodeId &key, ChainEntry **ppPrevious)
 finds the right entry in the chain. More...
 
void add (ChainEntry *pNewEntry)
 adds a new entry to the list. More...
 
void prepend (ChainEntry *pNewEntry)
 prepends a new entry to the list. More...
 
ChainEntryremove (const UaNodeId &key, ChainEntry **ppNext)
 removes an entry from the list. More...
 
ChainEntrygetNext () const
 Check if there is a chain. More...
 
void clearChain ()
 Clear the chain when the hashtable is cleared.
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter ()
 construction
 
virtual ~ReferenceCounter ()
 destruction
 
- Public Member Functions inherited from UaReferenceLists
 UaReferenceLists ()
 Constructs the reference lists object.
 
virtual ~UaReferenceLists ()
 Destroys the reference lists object.
 
virtual UaStatus browseReferences (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)
 Discover the references of a specified node of a view. More...
 
virtual UaStatus translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets)
 Find a node based on an element of an relative path. More...
 
virtual const UaReferencepTargetNodes () const
 Returns the list of references to target nodes. More...
 
virtual const UaReferencepSourceNodes () const
 Returns the list of references to source nodes. More...
 
virtual UaNodegetTargetNodeByBrowseName (const UaQualifiedName &browseName) const
 Searches a target node with the passed browse name and returns the UaNode interface if found. More...
 
virtual void addTargetNode (UaReference *pReference)
 Add a reference to a target node where this node is the source node. More...
 
virtual void addSourceNode (UaReference *pReference)
 Adds a reference to a source node where this node is the target node. More...
 
virtual UaStatus removeSourceNode (UaReference *pReferenceToRemove)
 Remove a reference to a source node where this node is the target node. More...
 
virtual bool removeSourceReference (UaReference *pReferenceToRemove)
 Remove the passed reference to a source node. More...
 
virtual UaStatus removeTargetNode (UaNode *pTargetNode, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional)
 Remove a reference to a target node where this node is the source node. More...
 
virtual UaStatus removeTargetNode (const UaNodeId &targetNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional)
 Remove a reference to a target node where this node is the source node. More...
 
virtual bool removeTargetReference (UaReference *pReferenceToRemove)
 Remove the passed reference to a target node. More...
 
virtual UaStatus removeCrossNodeManagerRef (NodeManager *pNodeManager)
 Remove references to another NodeManager. More...
 
virtual UaStatus invalidateSourceReferences (OpcUa_Boolean deleteSourceReferences)
 Set all references from SourceNodes to this Node invalid. More...
 
virtual UaStatus invalidateTargetReferences (OpcUa_Boolean deleteTargetReferences)
 Set all references to TargetNode of this node invalid. More...
 
virtual UaStatus deleteAllChildren (NodeManagerConfig *pNodeManagerConfig)
 Deletes all child nodes. More...
 

Static Public Member Functions

static void createTypes ()
 Create the type related static members of the class.
 
static void clearStaticMembers ()
 Clear the static members of the class.
 
static void setDefaultCallback (TrustListTypeCallback *pCallback)
 Set default callback interface for all trust list instances to get informed about TrustList updates.
 
- Static Public Member Functions inherited from OpcUa::TrustListTypeBase
static void createTypes ()
 Create the related type nodes.
 
static void clearStaticMembers ()
 Clear the static members of the class.
 
- Static Public Member Functions inherited from OpcUa::FileType
static void createTypes ()
 Create the type related static members of the class.
 
static void clearStaticMembers ()
 Clear the static members of the class.
 
- Static Public Member Functions inherited from OpcUa::FileTypeBase
static void createTypes ()
 Create the related type nodes.
 
static void clearStaticMembers ()
 Clear the static members of the class.
 
- Static Public Member Functions inherited from OpcUa::BaseObjectType
static void clearStaticMembers ()
 Clear the static members of the class.
 

Protected Member Functions

virtual ~TrustListType ()
 Destruction.
 
UaFilecreateFileAccessObject (Session *pSession, const UaString &sFileName)
 Creates an object with the interface UaFile used to access the file. More...
 
- Protected Member Functions inherited from OpcUa::TrustListTypeBase
virtual ~TrustListTypeBase ()
 Destruction.
 
- Protected Member Functions inherited from OpcUa::FileType
virtual ~FileType ()
 Destruction.
 
virtual OpcUa_Boolean checkUserAccess (Session *pSession, UaIODevice::OpenMode openMode)
 Verifies the open mode with the user rights for the file. More...
 
- Protected Member Functions inherited from OpcUa::FileTypeBase
virtual ~FileTypeBase ()
 Destruction.
 
- Protected Member Functions inherited from OpcUa::BaseObjectType
virtual ~BaseObjectType ()
 Destruction of the BaseObjectType. More...
 
- Protected Member Functions inherited from UaObject
virtual ~UaObject ()
 Destruction of the UaObject. More...
 
- Protected Member Functions inherited from UaNode
virtual ~UaNode ()
 Destruction of the UaNode. More...
 
- Protected Member Functions inherited from ChainEntry
virtual ~ChainEntry ()
 destruction
 
- Protected Member Functions inherited from UaReferenceLists
virtual UaStatus collectAllChildrenRecursive (NodeManagerConfig *pNodeManagerConfig, NodesToDeleteCollection &nodesToDeleteCollection, int recursionCounter=0)
 Collect a list of all child nodes. More...
 

Additional Inherited Members

- Protected Attributes inherited from UaReferenceLists
UaReferencem_pTargetNodes
 List of references to target nodes where this node is the source node. More...
 
UaReferencem_pLastTargetNode
 Last references in the list of references to the target nodes. More...
 
UaReferencem_pSourceNodes
 List of references to source nodes where this node is the target node. More...
 

Detailed Description

Class implementing the UaObject interface for the TrustListType.

OPC UA Objects are used to represent systems, system components, real-world objects and software objects. They have the NodeClass Object. The detailed description of Objects and their attributes can be found in the general description of the Object node class.

Variable members of the TrustListType:

Browse Name DataType TypeDefinition Modelling Rule See Also
LastUpdateTime UtcTime PropertyType Mandatory getLastUpdateTime, setLastUpdateTime
UpdateFrequency Duration PropertyType Optional getUpdateFrequency, setUpdateFrequency

Method members of the TrustListType:

Browse Name Modelling Rule
AddCertificate Optional
CloseAndUpdate Optional
OpenWithMasks Mandatory
RemoveCertificate Optional

Defines a FileType that can be used to access a trust list.

The CertificateManager uses this type to implement the Pull Model.

Servers use this type when implementing the Push Model.

An instance of a TrustListType must restrict access to appropriate users or applications. This may be a CertificateManager administrative user that can change the contents of a trust list, it may be an administrative user that is reading a trust list to deploy to an application host or it may be an application that can only access the trust list assigned to it.

The trust list file is a UA Binary encoded stream containing an instance of TrustListDataType.

The Open method shall not support modes other than Read (0x01) and the Write + EraseExisting (0x06).

When a Client opens the file for writing, the Server will not actually update the trust list until the CloseAndUpdate method is called. Simply calling Close will discard the updates. The bit masks in the TrustListDataType structure allow the Client to only update part of the trust list.

When the CloseAndUpdate method is called, the Server will validate all new Certificates and CRLs. If this validation fails, the trust list is not updated and the Server returns the appropriate certificate error code.

If auditing is supported, the CertificateManager shall generate the TrustListUpdatedAuditEventType when the CloseAndUpdate, AddCertificate or RemoveCertificate methods are called.

See also TrustListType for a documentation of the complete Information Model.

Constructor & Destructor Documentation

OpcUa::TrustListType::TrustListType ( const UaNodeId nodeId,
UaObject pInstanceDeclarationObject,
NodeManagerConfig pNodeConfig,
UaMutexRefCounted pSharedMutex = NULL 
)

Construction of the class TrustListType.

This constructor is used if the object is created based on an instance declaration of an object type. Since the only difference between the instance declaration object and the instance object are the node id, the pointer to the instance declaration node is used to get the attribute values other than NodeId from the instance declaration node.

The object is reference counted and can not be deleted directly. The reference counter is set to one after the object is created. If the object was successfully added to a NodeManager using the methods NodeManagerConfig::addUaNode or NodeManagerConfig::addNodeAndReference the NodeManager will release this reference during shut down. If the object was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availability of the object must be ensured by incrementing the reference counter with addReference when the pointer is stored somewhere and decremented with releaseReference if the interface pointer is not longer needed.

Parameters
[in]nodeIdNodeId of the new object
[in]pInstanceDeclarationObjectUaObject interface of the instance declaration node used to provide attribute values other than NodeId
[in]pNodeConfigInterface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space
[in]pSharedMutexShared mutex object used to synchronize access to the object. Can be NULL if no shared mutex is provided
OpcUa::TrustListType::TrustListType ( const UaNodeId nodeId,
const UaString name,
OpcUa_UInt16  browseNameNameSpaceIndex,
NodeManagerConfig pNodeConfig,
UaMutexRefCounted pSharedMutex = NULL 
)

Construction of the class TrustListType.

This constructor is used if the object is not created based on an instance declaration. It defines the name and node id of the object. Additional language specific names and other attribute values can be set with set methods provided by the class.

The object is reference counted and can not be deleted directly. The reference counter is set to one after the object is created. If the object was successfully added to a NodeManager using the methods NodeManagerConfig::addUaNode or NodeManagerConfig::addNodeAndReference the NodeManager will release this reference during shut down. If the object was not added to a NodeManager, it must be deleted using the releaseReference method. If the interface pointer is used in other places, the availability of the object must be ensured by incrementing the reference counter with addReference when the pointer is stored somewhere and decremented with releaseReference if the interface pointer is not longer needed.

Parameters
[in]nodeIdNodeId of the new object
[in]nameName of the new object. Used as browse name and also as display name if no additional language specific names are set.
[in]browseNameNameSpaceIndexNamespace index used for the browse name
[in]pNodeConfigInterface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space
[in]pSharedMutexShared mutex object used to synchronize access to the object. Can be NULL if no shared mutex is provided
OpcUa::TrustListType::TrustListType ( UaBase::Object pBaseNode,
XmlUaNodeFactoryManager pFactory,
NodeManagerConfig pNodeConfig,
UaMutexRefCounted pSharedMutex = NULL 
)

Constructs an instance of the class TrustListType with all components.

Parameters
[in]pBaseNodeThe "tree" of nodes that specifies the attributes of the instance and its children
[in]pFactoryThe factory to create the children
[in]pNodeConfigInterface pointer to the NodeManagerConfig interface used to add and delete node and references in the address space
[in]pSharedMutexShared mutex object used to synchronize access to the variable. Can be NULL if no shared mutex is provided

Member Function Documentation

UaStatus OpcUa::TrustListType::AddCertificate ( const ServiceContext serviceContext,
UaByteString Certificate,
OpcUa_Boolean  IsTrustedCertificate 
)
virtual

Allows a Client to add a single certificate to the trust list.

The Server shall verify that the certificate is valid according to the mandatory rules defined in Part 4 of the OPC UA Specification. If an invalid certificate is found, the Server shall return an error and shall not update the trust list.

This method cannot be called if the file object is open.

Method Result Codes

Result Code Description
Bad_UserAccessDenied The current user does not have the rights required.
Bad_CertificateInvalid The certificate to add is invalid.
Bad_InvalidState The object is opened.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]CertificateThe DER encoded certificate to add.
[in]IsTrustedCertificateIf TRUE, the certificate is added to the trusted certificate s list.
If FALSE, the certificate is added to the Issuer certificate s list.

Implements OpcUa::TrustListTypeBase.

UaStatus OpcUa::TrustListType::Close ( const ServiceContext serviceContext,
OpcUa_UInt32  FileHandle 
)
virtual

Closes a file represented by a FileType.

When a client closes a file, the handle becomes invalid.

Reimplemented from OpcUa::FileType.

UaStatus OpcUa::TrustListType::CloseAndUpdate ( const ServiceContext serviceContext,
OpcUa_UInt32  FileHandle,
OpcUa_Boolean &  ApplyChangesRequired 
)
virtual

Closes the file and applies the changes to the trust list.

This method can only be called if the file was opened for writing. If the Close method is called, any cached data is discarded and the trust list is not changed.

The Server shall verify that every certificate in the new trust list is valid according to the mandatory rules defined in Part 4 of the OPC UA Specification. If an invalid certificate is found, the Server shall return an error and shall not update the trust list. If only part of the trust list is being updated, the Server creates a temporary trust list that includes the existing trust list plus any updates and validates the temporary trust list.

If the file cannot be processed, this method still closes the file and discards the data before returning an error. This method is required if the Server supports updates to the trust list.

The structure uploaded includes a mask that specifies which fields are updated. If a bit is not set, the associated field is not changed.

Method Result Codes

Result Code Description
Bad_UserAccessDenied The current user does not have the rights required.
Bad_CertificateInvalid The Server could not validate all certificate s in the trust list. The DiagnosticInfo shall specify which certificate (s) are invalid and the specific error.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]FileHandleThe handle of the previously opened file.
[out]ApplyChangesRequiredA flag indicating whether the ApplyChanges method must be called before the new trust list will be used by the Server.

Implements OpcUa::TrustListTypeBase.

UaFile * OpcUa::TrustListType::createFileAccessObject ( Session pSession,
const UaString sFileName 
)
protectedvirtual

Creates an object with the interface UaFile used to access the file.

Creates derived class can create an object that has a specialized implementation of UaFile.

Parameters
[in]pSessionSession context used to access the file. This parameter is only relevant if this method is overwritten by a derived class.
[in]sFileNameName and path of the file to access.

Reimplemented from OpcUa::FileType.

void OpcUa::TrustListType::getCertificateManagementSettings ( bool &  allowTrustListUpdate)

Get trust list management settings.

The default setting allows trust list management for users who are in the SecurityAdmin group.

Parameters
[out]allowTrustListUpdateallow update of trust list
UaStatus OpcUa::TrustListType::Open ( const ServiceContext serviceContext,
OpcUa_Byte  Mode,
OpcUa_UInt32 &  FileHandle 
)
virtual

Opens a file represented by an Object of FileType.

When a client opens a file, it gets a FileHandle that is valid while the session is open. Clients shall use the Close Method to release the handle when they do not need access to the file anymore. Clients can open the same file several times for reading. A request to open for writing shall return Bad_NotWritable when the file is already opened.

Reimplemented from OpcUa::FileType.

UaStatus OpcUa::TrustListType::OpenWithMasks ( const ServiceContext serviceContext,
OpcUa_UInt32  Masks,
OpcUa_UInt32 &  FileHandle 
)
virtual

Allows a Client to read only the portion of the trust list.

This method can only be used to read the trust list.

Method Result Codes

Result Code Description
Bad_UserAccessDenied The current user does not have the rights required.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]MasksThe parts of the trust list that are to be included in the file to read.
[out]FileHandleThe handle of the newly opened file.

Implements OpcUa::TrustListTypeBase.

UaStatus OpcUa::TrustListType::RemoveCertificate ( const ServiceContext serviceContext,
const UaString Thumbprint,
OpcUa_Boolean  IsTrustedCertificate 
)
virtual

Allows a Client to remove a single certificate from the trust list.

This method returns Bad_InvalidArgument if the thumbprint does not match a certificate in the trust list.

This method cannot be called if the file object is open.

Method Result Codes

Result Code Description
Bad_UserAccessDenied The current user does not have the rights required.
Bad_InvalidArgument The certificate to remove was not found.
Bad_InvalidState The object is opened.
Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]ThumbprintThe SHA1 hash of the certificate to remove.
[in]IsTrustedCertificateIf TRUE, the certificate is removed from the trusted certificates list.
If FALSE, the certificate is removed from the Issuer certificate s list.

Implements OpcUa::TrustListTypeBase.

void OpcUa::TrustListType::setCertificateManagementSettings ( bool  allowTrustListUpdate)

Set trust list management settings.

Allows to disable ctrust list update depending on server state.

The default setting allows trust list management for users who are in the SecurityAdmin group.

Parameters
[in]allowTrustListUpdateallow update of trust list
void OpcUa::TrustListType::setTrustListConfiguration ( OpcUa_UInt32  nMaxTrustListSize,
const UaString sCertificateRevocationListLocation,
const UaString sCertificateTrustListLocation,
const UaString sIssuersRevocationListLocation,
const UaString sIssuersCertificatesLocation 
)

Sets the path strings and size for the trust list directories.

Parameters
nMaxTrustListSizeThe maximum size of the trust list in bytes
sCertificateRevocationListLocationThe folder where revocation lists for trusted CAs should be stored
sCertificateTrustListLocationThe folder where certificates of trusted applications and trusted CAs should be stored
sIssuersRevocationListLocationThe folder where revocation lists for issuer CAs should be stored
sIssuersCertificatesLocationThe folder where issuer certificates are stored. Issuer certificates are CA certificates necessary for the verification of the full trust chain of CA certificates in the trust list.

The documentation for this class was generated from the following files: