Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-opcua-service-secure-channel

Package Overview
Dependencies
Maintainers
1
Versions
217
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-service-secure-channel - npm Package Compare versions

Comparing version 2.0.0-alpha.8 to 2.0.0-alpha.9

11

dist/AsymmetricAlgorithmSecurityHeader.d.ts

@@ -0,5 +1,10 @@

/**
* @module node-opcua-service-secure-channel
*/
import { ByteString, UAString } from "node-opcua-basic-types";
import { BinaryStream } from "node-opcua-binary-stream";
import { BaseUAObject, StructuredTypeSchema } from "node-opcua-factory";
import { BinaryStream } from "node-opcua-binary-stream";
import { UAString, ByteString } from "node-opcua-basic-types";
export declare class AsymmetricAlgorithmSecurityHeader extends BaseUAObject {
static possibleFields: string[];
static schema: StructuredTypeSchema;
securityPolicyUri: UAString;

@@ -11,4 +16,2 @@ senderCertificate: ByteString;

decode(stream: BinaryStream): void;
static possibleFields: string[];
static schema: StructuredTypeSchema;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-service-secure-channel
*/
// OPC UA Secure Conversation Message Header : Part 6 page 36
// Asymmetric algorithms are used to secure the OpenSecureChannel messages.
const node_opcua_basic_types_1 = require("node-opcua-basic-types");
const node_opcua_factory_1 = require("node-opcua-factory");
const node_opcua_basic_types_1 = require("node-opcua-basic-types");
const schemaAsymmetricAlgorithmSecurityHeader = node_opcua_factory_1.buildStructuredType({

@@ -65,3 +68,7 @@ name: "AsymmetricAlgorithmSecurityHeader",

}
AsymmetricAlgorithmSecurityHeader.possibleFields = ["securityPolicyUri", "senderCertificate", "receiverCertificateThumbprint"];
AsymmetricAlgorithmSecurityHeader.possibleFields = [
"securityPolicyUri",
"senderCertificate",
"receiverCertificateThumbprint"
];
AsymmetricAlgorithmSecurityHeader.schema = schemaAsymmetricAlgorithmSecurityHeader;

@@ -68,0 +75,0 @@ exports.AsymmetricAlgorithmSecurityHeader = AsymmetricAlgorithmSecurityHeader;

@@ -6,2 +6,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-service-secure-channel
*/
// tslint:disable:max-line-length
const node_opcua_assert_1 = require("node-opcua-assert");

@@ -39,4 +43,4 @@ const node_opcua_types_1 = require("node-opcua-types");

get() { return hasTokenExpired(this); },
configurable: true,
enumerable: true,
configurable: true
});

@@ -66,3 +70,3 @@ // ErrorMessage

// OPC Unified Architecture, Part 4 $7.27 page 139
// ResponseHeade,
// Response Header,
// 0. timestamp UtcTime The time the Server sent the response.

@@ -69,0 +73,0 @@ node_opcua_assert_1.assert(node_opcua_types_1.ResponseHeader.schema.fields[0].name === "timestamp");

@@ -0,2 +1,5 @@

/**
* @module node-opcua-service-secure-channel
*/
import { MessageSecurityMode } from "node-opcua-types";
export declare function coerceMessageSecurityMode(value?: number | string): MessageSecurityMode;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-service-secure-channel
*/
const node_opcua_types_1 = require("node-opcua-types");

@@ -4,0 +7,0 @@ function coerceMessageSecurityMode(value) {

@@ -0,5 +1,10 @@

/**
* @module node-opcua-service-secure-channel
*/
import { UInt32 } from "node-opcua-basic-types";
import { BinaryStream } from "node-opcua-binary-stream";
import { BaseUAObject, StructuredTypeSchema } from "node-opcua-factory";
import { BinaryStream } from "node-opcua-binary-stream";
import { UInt32 } from "node-opcua-basic-types";
export declare class SymmetricAlgorithmSecurityHeader extends BaseUAObject {
static possibleFields: string[];
static schema: StructuredTypeSchema;
tokenId: UInt32;

@@ -9,4 +14,2 @@ constructor(options?: any);

decode(stream: BinaryStream): void;
static possibleFields: string[];
static schema: StructuredTypeSchema;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-service-secure-channel
*/
// Symmetric algorithms are used to secure all messages other than the OpenSecureChannel messages
// OPC UA Secure Conversation Message Header Release 1.02 Part 6 page 39
const node_opcua_basic_types_1 = require("node-opcua-basic-types");
const node_opcua_factory_1 = require("node-opcua-factory");
const node_opcua_basic_types_1 = require("node-opcua-basic-types");
const schemaSymmetricAlgorithmSecurityHeader = node_opcua_factory_1.buildStructuredType({

@@ -8,0 +11,0 @@ name: "SymmetricAlgorithmSecurityHeader",

{
"name": "node-opcua-service-secure-channel",
"version": "2.0.0-alpha.8",
"version": "2.0.0-alpha.9",
"description": "pure nodejs OPCUA SDK - module -service-secure-channel",

@@ -13,10 +13,10 @@ "main": "./dist/index.js",

"dependencies": {
"node-opcua-assert": "^2.0.0-alpha.8",
"node-opcua-basic-types": "^2.0.0-alpha.8",
"node-opcua-binary-stream": "^2.0.0-alpha.8",
"node-opcua-data-model": "^2.0.0-alpha.8",
"node-opcua-extension-object": "^2.0.0-alpha.8",
"node-opcua-factory": "^2.0.0-alpha.8",
"node-opcua-nodeid": "^2.0.0-alpha.8",
"node-opcua-types": "^2.0.0-alpha.8",
"node-opcua-assert": "^2.0.0-alpha.9",
"node-opcua-basic-types": "^2.0.0-alpha.9",
"node-opcua-binary-stream": "^2.0.0-alpha.9",
"node-opcua-data-model": "^2.0.0-alpha.9",
"node-opcua-extension-object": "^2.0.0-alpha.9",
"node-opcua-factory": "^2.0.0-alpha.9",
"node-opcua-nodeid": "^2.0.0-alpha.9",
"node-opcua-types": "^2.0.0-alpha.9",
"underscore": "^1.9.1"

@@ -26,7 +26,7 @@ },

"node-opcua-binary-stream": "^2.0.0-alpha.5",
"node-opcua-buffer-utils": "^2.0.0-alpha.8",
"node-opcua-debug": "^2.0.0-alpha.8",
"node-opcua-generator": "^2.0.0-alpha.8",
"node-opcua-packet-analyzer": "^2.0.0-alpha.8",
"node-opcua-status-code": "^2.0.0-alpha.8",
"node-opcua-buffer-utils": "^2.0.0-alpha.9",
"node-opcua-debug": "^2.0.0-alpha.9",
"node-opcua-generator": "^2.0.0-alpha.9",
"node-opcua-packet-analyzer": "^2.0.0-alpha.9",
"node-opcua-status-code": "^2.0.0-alpha.9",
"should": "13.2.3"

@@ -49,3 +49,3 @@ },

"homepage": "http://node-opcua.github.io/",
"gitHead": "7bbf38d5a3cd29cb6aed6ca38078f4d89d3f956a"
"gitHead": "cd7120d1840593757f0f3c9e53be4e85883dc0e6"
}

@@ -0,14 +1,26 @@

/**
* @module node-opcua-service-secure-channel
*/
// OPC UA Secure Conversation Message Header : Part 6 page 36
// Asymmetric algorithms are used to secure the OpenSecureChannel messages.
import {
ByteString,
decodeByteString,
decodeString,
encodeByteString,
encodeString,
UAString
} from "node-opcua-basic-types";
import { BinaryStream } from "node-opcua-binary-stream";
import {
BaseUAObject,
check_options_correctness_against_schema, initialize_field,
parameters, buildStructuredType, StructuredTypeSchema
buildStructuredType, check_options_correctness_against_schema,
initialize_field, parameters, StructuredTypeSchema
} from "node-opcua-factory";
import { BinaryStream } from "node-opcua-binary-stream";
import { UAString, ByteString, decodeString, encodeByteString, encodeString, decodeByteString } from "node-opcua-basic-types";
const schemaAsymmetricAlgorithmSecurityHeader: StructuredTypeSchema = buildStructuredType({
name: "AsymmetricAlgorithmSecurityHeader",
baseType: "BaseUAObject",
fields: [

@@ -18,3 +30,3 @@ // length shall not exceed 256

// This field is encoded as a UTF8 string without a null terminator
{name: "securityPolicyUri", fieldType: "String"},
{ name: "securityPolicyUri", fieldType: "String" },

@@ -37,3 +49,3 @@ // The X509v3 certificate assigned to the sending application instance.

// Receivers that do not handle Certificate chains shall ignore the extra bytes.
{name: "senderCertificate", fieldType: "ByteString", defaultValue: null},
{ name: "senderCertificate", fieldType: "ByteString", defaultValue: null },

@@ -44,3 +56,3 @@ // The thumbprint of the X509v3 certificate assigned to the receiving application

// This field shall be null if the message is not encrypted.
{name: "receiverCertificateThumbprint", fieldType: "ByteString", defaultValue: null}
{ name: "receiverCertificateThumbprint", fieldType: "ByteString", defaultValue: null }
]

@@ -50,6 +62,13 @@ });

export class AsymmetricAlgorithmSecurityHeader extends BaseUAObject {
securityPolicyUri: UAString;
senderCertificate: ByteString;
receiverCertificateThumbprint: ByteString;
public static possibleFields: string[] = [
"securityPolicyUri",
"senderCertificate",
"receiverCertificateThumbprint"
];
public static schema = schemaAsymmetricAlgorithmSecurityHeader;
public securityPolicyUri: UAString;
public senderCertificate: ByteString;
public receiverCertificateThumbprint: ByteString;
constructor(options?: any) {

@@ -68,3 +87,3 @@ options = options || {};

encode(stream: BinaryStream): void {
public encode(stream: BinaryStream): void {
super.encode(stream);

@@ -76,3 +95,3 @@ encodeString(this.securityPolicyUri, stream);

decode(stream: BinaryStream): void {
public decode(stream: BinaryStream): void {
super.decode(stream);

@@ -83,7 +102,4 @@ this.securityPolicyUri = decodeString(stream);

}
static possibleFields: string[] = ["securityPolicyUri", "senderCertificate", "receiverCertificateThumbprint"];
static schema = schemaAsymmetricAlgorithmSecurityHeader;
}
AsymmetricAlgorithmSecurityHeader.prototype.schema = AsymmetricAlgorithmSecurityHeader.schema;

@@ -0,1 +1,5 @@

/**
* @module node-opcua-service-secure-channel
*/
// tslint:disable:max-line-length
import { assert } from "node-opcua-assert";

@@ -5,5 +9,18 @@ import { AsymmetricAlgorithmSecurityHeader } from "./AsymmetricAlgorithmSecurityHeader";

import { ChannelSecurityToken, RequestHeader, ResponseHeader, SignatureData } from "node-opcua-types";
import {
_enumerationMessageSecurityMode,
ChannelSecurityToken,
CloseSecureChannelRequest,
CloseSecureChannelResponse,
MessageSecurityMode,
OpenSecureChannelRequest,
OpenSecureChannelResponse,
RequestHeader,
ResponseHeader,
SecurityTokenRequestType,
ServiceFault,
SignatureData,
UserTokenPolicy
} from "node-opcua-types";
export {

@@ -30,4 +47,2 @@ ChannelSecurityToken,

// createdAt

@@ -38,3 +53,2 @@ ChannelSecurityToken.schema.fields[2].defaultValue = () => new Date();

export function hasTokenExpired(token: ChannelSecurityToken): boolean {

@@ -48,4 +62,4 @@

get() { return hasTokenExpired(this as ChannelSecurityToken); },
configurable: true,
enumerable: true,
configurable: true
});

@@ -57,3 +71,2 @@

// OPC Unified Architecture, Part 4 $7.27 page 139

@@ -79,5 +92,4 @@ // RequestHeader",

// OPC Unified Architecture, Part 4 $7.27 page 139
// ResponseHeade,
// Response Header,
// 0. timestamp UtcTime The time the Server sent the response.

@@ -95,3 +107,2 @@ assert(ResponseHeader.schema.fields[0].name === "timestamp");

// OpenSecureChannelResponse

@@ -98,0 +109,0 @@ // documentation excerpt:

@@ -0,1 +1,4 @@

/**
* @module node-opcua-service-secure-channel
*/
import { _enumerationMessageSecurityMode, MessageSecurityMode } from "node-opcua-types";

@@ -2,0 +5,0 @@

@@ -0,14 +1,19 @@

/**
* @module node-opcua-service-secure-channel
*/
// Symmetric algorithms are used to secure all messages other than the OpenSecureChannel messages
// OPC UA Secure Conversation Message Header Release 1.02 Part 6 page 39
import { decodeUInt32, encodeUInt32, UInt32 } from "node-opcua-basic-types";
import { BinaryStream } from "node-opcua-binary-stream";
import {
BaseUAObject,
buildStructuredType,
BaseUAObject,
initialize_field, StructuredTypeSchema
} from "node-opcua-factory";
import { BinaryStream } from "node-opcua-binary-stream";
import { encodeUInt32, UInt32, decodeUInt32 } from "node-opcua-basic-types";
const schemaSymmetricAlgorithmSecurityHeader: StructuredTypeSchema = buildStructuredType({
name: "SymmetricAlgorithmSecurityHeader",
baseType: "BaseUAObject",
fields: [

@@ -24,4 +29,8 @@ // A unique identifier for the ClientSecureChannelLayer token used to secure the message

export class SymmetricAlgorithmSecurityHeader extends BaseUAObject {
tokenId: UInt32;
public static possibleFields: string[] = ["tokenId"];
public static schema = schemaSymmetricAlgorithmSecurityHeader;
public tokenId: UInt32;
constructor(options?: any) {

@@ -36,3 +45,3 @@ options = options || {};

encode(stream: BinaryStream): void {
public encode(stream: BinaryStream): void {
// call base class implementation first

@@ -43,3 +52,3 @@ super.encode(stream);

decode(stream: BinaryStream): void {
public decode(stream: BinaryStream): void {
// call base class implementation first

@@ -49,9 +58,4 @@ super.decode(stream);

}
static possibleFields: string[] = ["tokenId"];
static schema = schemaSymmetricAlgorithmSecurityHeader;
}
SymmetricAlgorithmSecurityHeader.prototype.schema = SymmetricAlgorithmSecurityHeader.schema;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc