How to use the node-opcua-service-secure-channel.ErrorMessage function in node-opcua-service-secure-channel

To help you get started, we’ve selected a few node-opcua-service-secure-channel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-secure-channel / src / secure_channel_service.js View on Github external
// A SecureChannel is a long-running logical connection between a single Client and a single Server.
// This channel maintains a set of keys known only to the Client and Server, which are used to
// authenticate and encrypt Messages sent across the network. The ClientSecureChannelLayer Services allow
// the Client and Server to securely negotiate the keys to use.

const _ = require("underscore");

const AsymmetricAlgorithmSecurityHeader = require("node-opcua-service-secure-channel").AsymmetricAlgorithmSecurityHeader;
const SymmetricAlgorithmSecurityHeader = require("node-opcua-service-secure-channel").SymmetricAlgorithmSecurityHeader;
const SequenceHeader = require("node-opcua-service-secure-channel").SequenceHeader;

exports.AsymmetricAlgorithmSecurityHeader = AsymmetricAlgorithmSecurityHeader;
exports.SymmetricAlgorithmSecurityHeader = SymmetricAlgorithmSecurityHeader;
exports.SequenceHeader = SequenceHeader;

exports.ErrorMessage = require("node-opcua-service-secure-channel").ErrorMessage;

//xx ChannelService
exports.AcknowledgeMessage = require("node-opcua-transport/_generated_/_auto_generated_AcknowledgeMessage").AcknowledgeMessage;
exports.HelloMessage = require("node-opcua-transport/_generated_/_auto_generated_HelloMessage").HelloMessage;

//var Padding_Schema = {
//    name: "Padding",
//    id: factories.next_available_id(),
//    fields: [
//        // The number of padding bytes (not including the byte for the PaddingSize).
//        { name: "paddingSize",        fieldType: "Byte" },
//        // Padding added to the end of the message to ensure length of the data to encrypt is an
//        // integer multiple of the encryption block size.
//        // The value of each byte of the padding is equal to PaddingSize.
//        { name: "padding",            fieldType: "Byte*" },
//