node-opcua-server 2.128.0 → 2.129.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/filter/check_where_clause_on_address_space.js +2 -1
- package/dist/filter/check_where_clause_on_address_space.js.map +1 -1
- package/dist/filter/extract_event_fields.js +2 -1
- package/dist/filter/extract_event_fields.js.map +1 -1
- package/dist/helper.js +4 -3
- package/dist/helper.js.map +1 -1
- package/dist/i_channel_data.d.ts +2 -4
- package/dist/i_register_server_manager.d.ts +1 -0
- package/dist/monitored_item.d.ts +2 -0
- package/dist/node_sampler.js +3 -2
- package/dist/node_sampler.js.map +1 -1
- package/dist/opcua_server.d.ts +1 -0
- package/dist/opcua_server.js +7 -7
- package/dist/opcua_server.js.map +1 -1
- package/dist/register_server_manager.d.ts +2 -0
- package/dist/register_server_manager_hidden.d.ts +1 -0
- package/dist/register_server_manager_mdns_only.d.ts +1 -0
- package/dist/server_end_point.d.ts +1 -0
- package/dist/server_end_point.js +1 -4
- package/dist/server_end_point.js.map +1 -1
- package/dist/server_engine.d.ts +2 -1
- package/dist/server_engine.js +6 -3
- package/dist/server_engine.js.map +1 -1
- package/dist/server_publish_engine.d.ts +1 -0
- package/dist/server_session.d.ts +2 -0
- package/dist/server_subscription.d.ts +1 -0
- package/dist/sessions_compatible_for_transfer.js +2 -1
- package/dist/sessions_compatible_for_transfer.js.map +1 -1
- package/dist/user_manager.js +2 -2
- package/dist/user_manager.js.map +1 -1
- package/dist/user_manager_ua.js +2 -1
- package/dist/user_manager_ua.js.map +1 -1
- package/dist/validate_filter.js +2 -1
- package/dist/validate_filter.js.map +1 -1
- package/package.json +30 -30
- package/source/i_channel_data.ts +0 -3
- package/source/opcua_server.ts +5 -7
- package/source/server_end_point.ts +1 -7
- package/source/server_engine.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.129.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module server",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -b",
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
"chalk": "4.1.2",
|
|
18
18
|
"dequeue": "^1.0.5",
|
|
19
19
|
"lodash": "4.17.21",
|
|
20
|
-
"node-opcua-address-space": "2.
|
|
21
|
-
"node-opcua-address-space-base": "2.
|
|
20
|
+
"node-opcua-address-space": "2.129.0",
|
|
21
|
+
"node-opcua-address-space-base": "2.129.0",
|
|
22
22
|
"node-opcua-assert": "2.120.0",
|
|
23
23
|
"node-opcua-basic-types": "2.128.0",
|
|
24
24
|
"node-opcua-binary-stream": "2.128.0",
|
|
25
|
-
"node-opcua-certificate-manager": "2.
|
|
26
|
-
"node-opcua-client": "2.
|
|
27
|
-
"node-opcua-client-dynamic-extension-object": "2.
|
|
28
|
-
"node-opcua-common": "2.
|
|
25
|
+
"node-opcua-certificate-manager": "2.129.0",
|
|
26
|
+
"node-opcua-client": "2.129.0",
|
|
27
|
+
"node-opcua-client-dynamic-extension-object": "2.129.0",
|
|
28
|
+
"node-opcua-common": "2.129.0",
|
|
29
29
|
"node-opcua-constants": "2.125.0",
|
|
30
|
-
"node-opcua-crypto": "4.
|
|
30
|
+
"node-opcua-crypto": "4.9.2",
|
|
31
31
|
"node-opcua-data-model": "2.128.0",
|
|
32
|
-
"node-opcua-data-value": "2.
|
|
32
|
+
"node-opcua-data-value": "2.129.0",
|
|
33
33
|
"node-opcua-date-time": "2.128.0",
|
|
34
34
|
"node-opcua-debug": "2.128.0",
|
|
35
35
|
"node-opcua-extension-object": "2.128.0",
|
|
@@ -39,31 +39,31 @@
|
|
|
39
39
|
"node-opcua-nodesets": "2.121.0",
|
|
40
40
|
"node-opcua-numeric-range": "2.128.0",
|
|
41
41
|
"node-opcua-object-registry": "2.128.0",
|
|
42
|
-
"node-opcua-secure-channel": "2.
|
|
43
|
-
"node-opcua-service-browse": "2.
|
|
44
|
-
"node-opcua-service-call": "2.
|
|
45
|
-
"node-opcua-service-discovery": "2.
|
|
46
|
-
"node-opcua-service-endpoints": "2.
|
|
47
|
-
"node-opcua-service-filter": "2.
|
|
48
|
-
"node-opcua-service-history": "2.
|
|
49
|
-
"node-opcua-service-node-management": "2.
|
|
50
|
-
"node-opcua-service-query": "2.
|
|
51
|
-
"node-opcua-service-read": "2.
|
|
52
|
-
"node-opcua-service-register-node": "2.
|
|
53
|
-
"node-opcua-service-secure-channel": "2.
|
|
54
|
-
"node-opcua-service-session": "2.
|
|
55
|
-
"node-opcua-service-subscription": "2.
|
|
56
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
57
|
-
"node-opcua-service-write": "2.
|
|
42
|
+
"node-opcua-secure-channel": "2.129.0",
|
|
43
|
+
"node-opcua-service-browse": "2.129.0",
|
|
44
|
+
"node-opcua-service-call": "2.129.0",
|
|
45
|
+
"node-opcua-service-discovery": "2.129.0",
|
|
46
|
+
"node-opcua-service-endpoints": "2.129.0",
|
|
47
|
+
"node-opcua-service-filter": "2.129.0",
|
|
48
|
+
"node-opcua-service-history": "2.129.0",
|
|
49
|
+
"node-opcua-service-node-management": "2.129.0",
|
|
50
|
+
"node-opcua-service-query": "2.129.0",
|
|
51
|
+
"node-opcua-service-read": "2.129.0",
|
|
52
|
+
"node-opcua-service-register-node": "2.129.0",
|
|
53
|
+
"node-opcua-service-secure-channel": "2.129.0",
|
|
54
|
+
"node-opcua-service-session": "2.129.0",
|
|
55
|
+
"node-opcua-service-subscription": "2.129.0",
|
|
56
|
+
"node-opcua-service-translate-browse-path": "2.129.0",
|
|
57
|
+
"node-opcua-service-write": "2.129.0",
|
|
58
58
|
"node-opcua-status-code": "2.128.0",
|
|
59
|
-
"node-opcua-transport": "2.
|
|
60
|
-
"node-opcua-types": "2.
|
|
59
|
+
"node-opcua-transport": "2.129.0",
|
|
60
|
+
"node-opcua-types": "2.129.0",
|
|
61
61
|
"node-opcua-utils": "2.128.0",
|
|
62
|
-
"node-opcua-variant": "2.
|
|
62
|
+
"node-opcua-variant": "2.129.0",
|
|
63
63
|
"thenify": "^3.3.1"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"node-opcua-data-access": "2.
|
|
66
|
+
"node-opcua-data-access": "2.129.0",
|
|
67
67
|
"node-opcua-leak-detector": "2.128.0",
|
|
68
68
|
"node-opcua-test-helpers": "2.128.0",
|
|
69
69
|
"underscore": "^1.13.6"
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"internet of things"
|
|
84
84
|
],
|
|
85
85
|
"homepage": "http://node-opcua.github.io/",
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "8a1754350fb95a764e278d37a289f0c48ccb8c9d",
|
|
87
87
|
"files": [
|
|
88
88
|
"dist",
|
|
89
89
|
"source"
|
package/source/i_channel_data.ts
CHANGED
|
@@ -3,9 +3,6 @@ import { AsymmetricAlgorithmSecurityHeader, MessageSecurityMode, SecurityPolicy
|
|
|
3
3
|
export interface IChannelData {
|
|
4
4
|
channelId: number | null;
|
|
5
5
|
clientCertificate: Buffer | null;
|
|
6
|
-
clientNonce: Buffer | null;
|
|
7
|
-
clientSecurityHeader: any;
|
|
8
|
-
securityHeader: AsymmetricAlgorithmSecurityHeader | null;
|
|
9
6
|
securityMode: MessageSecurityMode;
|
|
10
7
|
securityPolicy: SecurityPolicy;
|
|
11
8
|
timeout: number;
|
package/source/opcua_server.ts
CHANGED
|
@@ -317,7 +317,7 @@ function adjustSecurityPolicy(channel: ServerSecureChannelLayer, userTokenPolicy
|
|
|
317
317
|
|
|
318
318
|
// if the security policy is not specified we use the session security policy
|
|
319
319
|
if (securityPolicy === SecurityPolicy.Invalid) {
|
|
320
|
-
securityPolicy = fromURI(
|
|
320
|
+
securityPolicy = fromURI(channel.securityPolicy);
|
|
321
321
|
assert(securityPolicy !== SecurityPolicy.Invalid);
|
|
322
322
|
}
|
|
323
323
|
return securityPolicy;
|
|
@@ -671,7 +671,7 @@ function validate_security_endpoint(
|
|
|
671
671
|
return { errCode: StatusCodes.BadSecurityModeRejected };
|
|
672
672
|
}
|
|
673
673
|
const endpoints_matching_security_policy = endpoints_matching_security_mode.filter((e: EndpointDescription) => {
|
|
674
|
-
return e.securityPolicyUri === channel
|
|
674
|
+
return e.securityPolicyUri === channel!.securityPolicy;
|
|
675
675
|
});
|
|
676
676
|
|
|
677
677
|
if (endpoints_matching_security_policy.length === 0) {
|
|
@@ -1503,7 +1503,7 @@ export class OPCUAServer extends OPCUABaseServer {
|
|
|
1503
1503
|
clientCertificate: Certificate,
|
|
1504
1504
|
clientNonce: Nonce
|
|
1505
1505
|
): SignatureData | undefined {
|
|
1506
|
-
return computeSignature(clientCertificate, clientNonce, this.getPrivateKey(), channel.
|
|
1506
|
+
return computeSignature(clientCertificate, clientNonce, this.getPrivateKey(), channel.securityPolicy);
|
|
1507
1507
|
}
|
|
1508
1508
|
|
|
1509
1509
|
/**
|
|
@@ -1518,12 +1518,10 @@ export class OPCUAServer extends OPCUABaseServer {
|
|
|
1518
1518
|
channel: ServerSecureChannelLayer,
|
|
1519
1519
|
clientSignature: SignatureData
|
|
1520
1520
|
): boolean {
|
|
1521
|
-
const clientCertificate = channel.
|
|
1522
|
-
const securityPolicy = channel.
|
|
1521
|
+
const clientCertificate = channel.clientCertificate!;
|
|
1522
|
+
const securityPolicy = channel.securityPolicy;
|
|
1523
1523
|
const serverCertificate = this.getCertificate();
|
|
1524
|
-
|
|
1525
1524
|
const result = verifySignature(serverCertificate, session.nonce!, clientSignature, clientCertificate, securityPolicy);
|
|
1526
|
-
|
|
1527
1525
|
return result;
|
|
1528
1526
|
}
|
|
1529
1527
|
|
|
@@ -60,9 +60,6 @@ function extractChannelData(channel: ServerSecureChannelLayer): IChannelData {
|
|
|
60
60
|
const {
|
|
61
61
|
channelId,
|
|
62
62
|
clientCertificate,
|
|
63
|
-
clientNonce,
|
|
64
|
-
clientSecurityHeader,
|
|
65
|
-
securityHeader,
|
|
66
63
|
securityMode,
|
|
67
64
|
securityPolicy,
|
|
68
65
|
timeout,
|
|
@@ -72,9 +69,6 @@ function extractChannelData(channel: ServerSecureChannelLayer): IChannelData {
|
|
|
72
69
|
const channelData: IChannelData = {
|
|
73
70
|
channelId,
|
|
74
71
|
clientCertificate,
|
|
75
|
-
clientNonce,
|
|
76
|
-
clientSecurityHeader,
|
|
77
|
-
securityHeader,
|
|
78
72
|
securityMode,
|
|
79
73
|
securityPolicy,
|
|
80
74
|
timeout,
|
|
@@ -761,7 +755,7 @@ export class OPCUAServerEndPoint extends EventEmitter implements ServerSecureCha
|
|
|
761
755
|
timeout: this.timeout,
|
|
762
756
|
adjustTransportLimits: this.transportSettings?.adjustTransportLimits
|
|
763
757
|
});
|
|
764
|
-
|
|
758
|
+
|
|
765
759
|
debugLog("channel Timeout = >", channel.timeout);
|
|
766
760
|
|
|
767
761
|
socket.resume();
|
package/source/server_engine.ts
CHANGED
|
@@ -749,7 +749,7 @@ export class ServerEngine extends EventEmitter implements IAddressSpaceAccessor
|
|
|
749
749
|
* @param options.nodeset_filename {String} - [option](default : 'mini.Node.Set2.xml' )
|
|
750
750
|
* @param callback
|
|
751
751
|
*/
|
|
752
|
-
public initialize(options: OPCUAServerOptions, callback: () => void): void {
|
|
752
|
+
public initialize(options: OPCUAServerOptions, callback: (err?: Error | null) => void): void {
|
|
753
753
|
assert(!this.addressSpace); // check that 'initialize' has not been already called
|
|
754
754
|
|
|
755
755
|
this._internalState = "initializing";
|
|
@@ -773,7 +773,10 @@ export class ServerEngine extends EventEmitter implements IAddressSpaceAccessor
|
|
|
773
773
|
assert(serverNamespace.index === 1);
|
|
774
774
|
}
|
|
775
775
|
// eslint-disable-next-line max-statements
|
|
776
|
-
generateAddressSpace(this.addressSpace, options.nodeset_filename
|
|
776
|
+
generateAddressSpace(this.addressSpace, options.nodeset_filename).catch((err) => {
|
|
777
|
+
console.log(err.message);
|
|
778
|
+
callback(err);
|
|
779
|
+
}).then(() => {
|
|
777
780
|
/* istanbul ignore next */
|
|
778
781
|
if (!this.addressSpace) {
|
|
779
782
|
throw new Error("Internal error");
|