ServerSecureChannelLayer Class
Constructor
ServerSecureChannelLayer
        
                - 
                                
options 
Parameters:
- 
                                
optionsObject- 
                                            
parentOPCUAServerEndPointparent
 - 
                                            
[timeout= 30000]Number optionaltimeout in milliseconds
 - 
                                            
[defaultSecureTokenLifetime= 30000]optionaldefaultSecureTokenLifetime
 - 
                                            
[objectFactory]optionalan factory that provides a method createObjectId(id) for the message builder
 
 - 
                                            
 
Item Index
Methods
- _check_receiverCertificateThumbprint verify that the receiverCertificateThumbprint send by the client matching the CertificateThumbPrint of the server
 - _prepare_security_header
 - _process_certificates
 - _read_headers
 - chunkSecureMessage
 - close
 - getCertificate
 - getCertificate
 - getPrivateKey
 - init
 - send_error_and_abort
 - send_response
 - update
 
Properties
Events
Methods
_check_receiverCertificateThumbprint
                    verify that the receiverCertificateThumbprint send by the client
                    matching the CertificateThumbPrint of the server
                    
                            - 
                                            
clientSecurityHeader 
Parameters:
- 
                                            
clientSecurityHeaderObject 
Returns:
_prepare_security_header
                    
                            - 
                                            
request - 
                                            
message 
Parameters:
- 
                                            
requestObject - 
                                            
messageObject 
Returns:
_process_certificates
                    
                            - 
                                            
message - 
                                            
callback 
_process_certificates extracts client public keys from client certificate and store them in self.receiverPublicKey and self.receiverCertificate it also caches self.receiverPublicKeyLength.
so they can be used by security channel.
Parameters:
- 
                                            
messageObjectthe message coming from the client
 - 
                                            
callbackObject 
_read_headers
                    
                            - 
                                            
binaryStream 
Parameters:
- 
                                            
binaryStreamObject 
Returns:
chunkSecureMessage
                    
                            - 
                                            
msgType - 
                                            
options - 
                                            
message - 
                                            
messageChunkCallback 
Parameters:
- 
                                            
msgTypeString - 
                                            
optionsObject- 
                                                        
tokenId - 
                                                        
chunkSize[default=8192]
 - 
                                                        
signatureLengthNumber[default=0]
 - 
                                                        
signingFuncFunction[default=null]
 
 - 
                                                        
 - 
                                            
messageObject - 
                                            
messageChunkCallbackFunction 
close
                    
                            - 
                                            
callback 
Abruptly close a Server SecureChannel ,by terminating the underlying transport.
Parameters:
- 
                                            
callbackFunction 
getCertificate
                    
                            ()
                    
                            
                                Buffer
                            
                    
                    
                    
                    
                    
                    
                    
                        
                    
                        Returns:
the X509 DER form certificate
getCertificate
                    
                            ()
                    
                            
                                Buffer
                            
                    
                    
                    
                    
                    
                    
                    
                        
                    
                        Returns:
the X509 DER form certificate
getPrivateKey
                    
                            ()
                    
                            
                                Buffer
                            
                    
                    
                    
                    
                    
                    
                    
                        
                    
                        Returns:
the privateKey
init
                    
                            - 
                                            
socket - 
                                            
callback 
Parameters:
- 
                                            
socketSocket - 
                                            
callbackFunction 
send_error_and_abort
                    
                            - 
                                            
statusCode - 
                                            
description - 
                                            
message - 
                                            
callback 
send a ServiceFault response
Parameters:
- 
                                            
statusCodeStatusCodethe status code
 - 
                                            
descriptionString - 
                                            
messageString - 
                                            
callbackFunction 
send_response
                    
                            - 
                                            
msgType - 
                                            
response - 
                                            
message - 
                                            
[callback] 
Parameters:
- 
                                            
msgTypeObject - 
                                            
responseObject - 
                                            
messageObject - 
                                            
[callback]Function optionalan optional callback function
 
update
                    
                            - 
                                            
options 
Parameters:
- 
                                            
optionsObject- 
                                                        
securityHeaderObjectSecurityHeader
 - 
                                                        
[derivedKeys]Object optionalderivedKeys
 
 - 
                                                        
 
Properties
bytesRead
                        Number
                    
                    
                    
                    
                    
                        
                    
                        the number of bytes read so far by this channel
bytesWritten
                        Number
                    
                    
                    
                    
                    
                        
                    
                        the number of bytes written so far by this channel
hashKey
                        String
                    
                    
                    
                    
                    
                        
                    
                        The unique hash key to identify this secure channel
hasSession
                        Boolean
                    
                    
                    
                    
                    
                        
                    
                        true when the secure channel is assigned to a active session
isOpened
                        Boolean
                    
                    
                    
                    
                    
                        
                    
                        true when the secure channel has been opened successfully
Events
abort
                        
                    
                    
                    
                    
                    
                        
                    
                        notify the observers that the SecureChannel has aborted. the reason could be :
- a CloseSecureChannelRequest has been received.
 - a invalid message has been received the event is sent after the underlying transport layer has been closed.
 
invalid_sequence_number
                        
                    
                    
                    
                    
                    
                        
                    
                        Event Payload:
- 
                                            
expectedNumbersequence Number - 
                                            
actualNumbersequence Number 
message
                        
                    
                    
                    
                    
                    
                        
                    
                        notify the observer that a OPCUA message has been received. It is up to one observer to call send_response or send_error_and_abort to complete the transaction.
Event Payload:
- 
                                            
messageObject 
            The NodeOPCUA API