The CloseAndUpdate Method 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 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 OPC 10000-4. 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 (see 7.5.8) which specifies which fields are updated. If a bit is not set then the associated field is not changed.
CloseAndUpdate( [in] UInt32 fileHandle [out] Boolean applyChangesRequired );
|fileHandle||The handle of the previously opened file.|
|applyChangesRequired||A flag indicating whether the ApplyChanges Method (see 7.7.5) shall be called before the new Trust List will be used by the Server.|
Method Result Codes (defined in Call Service)
|Bad_UserAccessDenied||The current user does not have the rights required.|
|Bad_CertificateInvalid||The Server could not validate all Certificates in the Trust List.
The DiagnosticInfo shall specify which Certificate(s) are invalid and the specific error.
Table 15 specifies the AddressSpace representation for the CloseAndUpdate Method.
Table 15 – CloseAndUpdate Method AddressSpace Definition