.NET Based OPC UA Client/Server SDK
2.5.3.389
|
An object which represents a trust list. More...
Inherits UnifiedAutomation.UaServer.FileModel, UnifiedAutomation.UaServer.IMethodDispatcher, and UnifiedAutomation.UaServer.ITrustListMethods.
Public Member Functions | |
override StatusCode | Open (RequestContext context, FileModel model, byte mode, out uint fileHandle) |
Opens the specified context. More... | |
virtual StatusCode | OpenWithMasks (RequestContext context, TrustListModel model, uint masks, out uint fileHandle) |
Allows a Client to read only a portion of the trust list. More... | |
virtual StatusCode | CloseAndUpdate (RequestContext context, TrustListModel model, uint fileHandle, out bool restartRequired) |
Closes the file and applies the changes to the trust list. More... | |
StatusCode | AddCertificate (RequestContext context, TrustListModel model, byte[] certificate, bool isTrustedCertificate) |
Allows a Client to add a single certificate to the trust list. More... | |
StatusCode | RemoveCertificate (RequestContext context, TrustListModel model, string thumbprint, bool isTrustedCertificate) |
Allows a Client to remove a single certificate from the trust list. More... | |
TrustListModel () | |
Initializes a new instance of the TrustListModel class. More... | |
TrustListModel (TrustListModel template) | |
Initializes a new instance of the TrustListModel class. More... | |
override CallMethodEventHandler | GetMethodDispatcher (RequestContext context, NodeId objectId, NodeId methodId) |
Gets the method dispatcher. More... | |
override StatusCode | DispatchMethod (RequestContext context, MethodHandle methodHandle, IList< Variant > inputArguments, List< StatusCode > inputArgumentResults, List< Variant > outputArguments) |
Dispatches the method. More... | |
Public Member Functions inherited from UnifiedAutomation.UaServer.FileModel | |
void | Dispose () |
Frees any unmanaged resources. More... | |
virtual StatusCode | Close (RequestContext context, FileModel model, uint fileHandle) |
Closes a file represented by a FileType. More... | |
virtual StatusCode | Read (RequestContext context, FileModel model, uint fileHandle, int length, out byte[] data) |
Reads a part of the file starting from the current file position. More... | |
virtual StatusCode | Write (RequestContext context, FileModel model, uint fileHandle, byte[] data) |
Writes a part of the file starting from the current file position. More... | |
virtual StatusCode | SetPosition (RequestContext context, FileModel model, uint fileHandle, ulong position) |
Used to set the current position of the FileHandle. More... | |
virtual StatusCode | GetPosition (RequestContext context, FileModel model, uint fileHandle, out ulong position) |
Provides the current position of the FileHandle. More... | |
FileModel () | |
Initializes a new instance of the FileModel class. More... | |
FileModel (FileModel template) | |
Initializes a new instance of the FileModel class. More... | |
Public Member Functions inherited from UnifiedAutomation.UaServer.BaseObjectModel | |
BaseObjectModel () | |
Initializes a new instance of the BaseObjectModel class. More... | |
BaseObjectModel (BaseObjectModel template) | |
Initializes a new instance of the BaseObjectModel class. More... | |
Public Member Functions inherited from UnifiedAutomation.UaServer.ModelControllerBase | |
virtual ModelHandle | GetModelHandle (StringTable namespaceUris, object instance) |
Gets the metadata handle. More... | |
virtual DataValue | GetValue (IMapperContext context, ModelMapping mapping) |
Gets the value associated with the mapping. More... | |
virtual bool | SetValue (IMapperContext context, ModelMapping mapping, DataValue value) |
Sets the value associated with the mapping. More... | |
Properties | |
string | StorePath [get, set] |
Gets or sets the store path. More... | |
DateTime | LastUpdateTime [get, set] |
Indicates when the trust list was last updated via trust list object methods. More... | |
Properties inherited from UnifiedAutomation.UaServer.FileModel | |
FileInfo | FileOnDisk [get, set] |
Gets or sets the disk file which can be accessed via the file object. More... | |
int | MaxFileSize [get, set] |
Gets or sets the maximum size of the file in bytes. More... | |
INodeAccessInfo | NodeAccessInfo [get, set] |
Gets or sets the NodeAccessInfo to specify user access in Open method. More... | |
uint | NextFileHandle [get, set] |
Gets or sets the next file handle to assign. More... | |
string | MimeType [get, set] |
Contains the media type of the file based on RFC 2046. More... | |
ushort | OpenCount [get, set] |
Indicates the number of currently valid file handles on the file. More... | |
ulong | Size [get, set] |
Defines the size of the file in Bytes. More... | |
bool | UserWritable [get, set] |
Indicates whether the file is writable, taking user access rights into account. More... | |
bool | Writable [get, set] |
Indicates whether the file is writable. More... | |
IFileMethods | FileMethods [get, set] |
Gets or sets the File methods. More... | |
Properties inherited from UnifiedAutomation.UaServer.ModelControllerBase | |
ModelHandle | ModelHandle [get, set] |
Gets or sets the metadata handle. More... | |
object | UserData [get, set] |
Gets or sets the user data. More... | |
Events | |
EventHandler < ReadTrustListEventArgs > | ReadTrustListRequested |
Occurs when the trust list is opened for reading. More... | |
EventHandler < WriteTrustListEventArgs > | WriteTrustListRequested |
Occurs when the trust list has been uploaded and the changes need to be applied. More... | |
EventHandler < CertificateAddedEventArgs > | AddCertificateRequested |
Occurs when the trust list has been uploaded and the changes need to be applied. More... | |
EventHandler < RemoveCertificateEventArgs > | RemoveCertificateRequested |
Occurs when the remove certificate method is called. More... | |
Events inherited from UnifiedAutomation.UaServer.FileModel | |
EventHandler< OpenFileEventArgs > | OpenRequested |
Occurs when the file is opened. More... | |
EventHandler< CloseFileEventArgs > | CloseRequested |
Occurs when the file is closed. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from UnifiedAutomation.UaServer.FileModel | |
virtual void | Dispose (bool disposing) |
An overrideable version of the Dispose. More... | |
virtual bool | HasAccess (RequestContext context, UserAccessMask accessMasks) |
Determines whether the current context has specified access to the file. More... | |
void | CleanupExpiredHandles () |
Cleans up any expired handles. More... | |
StatusCode | OpenStream (OpenFileHandle handle) |
Opens a stream for the file referenced by FileOnDisk. More... | |
OpenFileHandle | FindHandle (RequestContext context, uint fileHandle) |
Finds the handle. More... | |
void | SaveHandle (OpenFileHandle handle) |
Assigns a unique id to the handle and saves the handle. More... | |
void | CloseHandle (OpenFileHandle handle) |
Closes the stream associated with the handle and sets the size of the File object. More... | |
Protected Attributes inherited from UnifiedAutomation.UaServer.FileModel | |
object | Lock = new object() |
An object used to synchronize access to the file object. More... | |
An object which represents a trust list.
Defines a UnifiedAutomation.UaServer.FileModel 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 UnifiedAutomation.UaServer.ITrustListMethods.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 UnifiedAutomation.UaServer.ITrustListMethods.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 UnifiedAutomation.UaServer.ITrustListMethods.CloseAndUpdate, UnifiedAutomation.UaServer.ITrustListMethods.AddCertificate or UnifiedAutomation.UaServer.ITrustListMethods.RemoveCertificate methods are called.
|
inline |
Initializes a new instance of the TrustListModel class.
|
inline |
Initializes a new instance of the TrustListModel class.
template | The template. |
|
inline |
Allows a Client to add a single certificate to the trust list.
The Server always validates the certificate before adding it and returns the appropriate error code on failure.
This method cannot be called if the file object is open.
context | The context. |
model | The model. |
certificate | The DER encoded certificate to add. |
isTrustedCertificate | Flag indicating whether the certificate is not an issuer certificate. If TRUE, the certificate is added to the trusted certificates list. If FALSE, the certificate is added to the issuer certificates list. |
Implements UnifiedAutomation.UaServer.ITrustListMethods.
|
inlinevirtual |
Closes the file and applies the changes to the trust list.
It can only be called if the file was opened for writing.
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 writes.
The structure uploaded includes a mask which specifies which fields are updated. If a bit is not set, the associated field is not changed.
context | The context. |
model | The model. |
fileHandle | Handle of the previously opened file. |
restartRequired | if set to true a restart is required. |
Implements UnifiedAutomation.UaServer.ITrustListMethods.
|
inlinevirtual |
Dispatches the method.
context | The context. |
methodHandle | The method handle. |
inputArguments | The input arguments. |
inputArgumentResults | The input argument results. |
outputArguments | The output arguments. |
Reimplemented from UnifiedAutomation.UaServer.FileModel.
|
inline |
Gets the method dispatcher.
context | The context. |
objectId | The object id. |
methodId | The method id. |
Implements UnifiedAutomation.UaServer.IMethodDispatcher.
|
inlinevirtual |
Opens the specified context.
context | The context. |
model | The model. |
mode | The mode. |
fileHandle | The file handle. |
Reimplemented from UnifiedAutomation.UaServer.FileModel.
|
inlinevirtual |
Allows a Client to read only a portion of the trust list.
This method can only be used to read the trust list.
context | The context. |
model | The model. |
masks | The parts of the trust list that are include in the file to read. |
fileHandle | The handle of the newly opened file. |
Implements UnifiedAutomation.UaServer.ITrustListMethods.
|
inline |
Allows a Client to remove a single certificate from the trust list.
It 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.
context | The context. |
model | The model. |
thumbprint | The SHA1 hash of the certificate to remove. |
isTrustedCertificate | Flag indicating whether the certificate is not an issuer certificate. If TRUE, the certificate is removed from the trusted certificates list. If FALSE, the certificate is removed from the issuer certificates list. |
Implements UnifiedAutomation.UaServer.ITrustListMethods.
|
getset |
Indicates when the trust list was last updated via trust list object methods.
This can be used to determine whether a device has an up to date trust list or to detect unexpected modifications. Out of band changes are not necessarily reported by this value.
|
getset |
Gets or sets the store path.
The store path.
EventHandler<CertificateAddedEventArgs> UnifiedAutomation.UaServer.TrustListModel.AddCertificateRequested |
Occurs when the trust list has been uploaded and the changes need to be applied.
EventHandler<ReadTrustListEventArgs> UnifiedAutomation.UaServer.TrustListModel.ReadTrustListRequested |
Occurs when the trust list is opened for reading.
EventHandler<RemoveCertificateEventArgs> UnifiedAutomation.UaServer.TrustListModel.RemoveCertificateRequested |
Occurs when the remove certificate method is called.
EventHandler<WriteTrustListEventArgs> UnifiedAutomation.UaServer.TrustListModel.WriteTrustListRequested |
Occurs when the trust list has been uploaded and the changes need to be applied.