@zwave-js/cc 14.0.0-beta.0 → 14.0.0-beta.1
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/build/cc/AlarmSensorCC.d.ts +2 -1
- package/build/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/cc/AlarmSensorCC.js +12 -11
- package/build/cc/AlarmSensorCC.js.map +1 -1
- package/build/cc/AssociationCC.d.ts +7 -6
- package/build/cc/AssociationCC.d.ts.map +1 -1
- package/build/cc/AssociationCC.js +7 -6
- package/build/cc/AssociationCC.js.map +1 -1
- package/build/cc/AssociationGroupInfoCC.d.ts +7 -6
- package/build/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/cc/AssociationGroupInfoCC.js +13 -12
- package/build/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/cc/BarrierOperatorCC.d.ts +4 -3
- package/build/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/cc/BarrierOperatorCC.js +20 -19
- package/build/cc/BarrierOperatorCC.js.map +1 -1
- package/build/cc/BasicCC.d.ts +3 -2
- package/build/cc/BasicCC.d.ts.map +1 -1
- package/build/cc/BasicCC.js +4 -3
- package/build/cc/BasicCC.js.map +1 -1
- package/build/cc/BatteryCC.d.ts +2 -1
- package/build/cc/BatteryCC.d.ts.map +1 -1
- package/build/cc/BatteryCC.js +8 -7
- package/build/cc/BatteryCC.js.map +1 -1
- package/build/cc/BinarySensorCC.d.ts +4 -3
- package/build/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/cc/BinarySensorCC.js +11 -10
- package/build/cc/BinarySensorCC.js.map +1 -1
- package/build/cc/BinarySwitchCC.d.ts +3 -2
- package/build/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/cc/BinarySwitchCC.js +5 -4
- package/build/cc/BinarySwitchCC.js.map +1 -1
- package/build/cc/CRC16CC.d.ts +2 -1
- package/build/cc/CRC16CC.d.ts.map +1 -1
- package/build/cc/CRC16CC.js +3 -2
- package/build/cc/CRC16CC.js.map +1 -1
- package/build/cc/CentralSceneCC.d.ts +2 -1
- package/build/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/cc/CentralSceneCC.js +6 -5
- package/build/cc/CentralSceneCC.js.map +1 -1
- package/build/cc/ClimateControlScheduleCC.d.ts +4 -3
- package/build/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/cc/ClimateControlScheduleCC.js +11 -10
- package/build/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/cc/ClockCC.d.ts +2 -1
- package/build/cc/ClockCC.d.ts.map +1 -1
- package/build/cc/ClockCC.js +5 -4
- package/build/cc/ClockCC.js.map +1 -1
- package/build/cc/ColorSwitchCC.d.ts +7 -6
- package/build/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/cc/ColorSwitchCC.js +23 -22
- package/build/cc/ColorSwitchCC.js.map +1 -1
- package/build/cc/ConfigurationCC.d.ts +12 -11
- package/build/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/cc/ConfigurationCC.js +25 -24
- package/build/cc/ConfigurationCC.js.map +1 -1
- package/build/cc/DoorLockCC.d.ts +3 -2
- package/build/cc/DoorLockCC.d.ts.map +1 -1
- package/build/cc/DoorLockCC.js +18 -17
- package/build/cc/DoorLockCC.js.map +1 -1
- package/build/cc/DoorLockLoggingCC.d.ts +2 -1
- package/build/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/cc/DoorLockLoggingCC.js +4 -3
- package/build/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/cc/EnergyProductionCC.d.ts +3 -2
- package/build/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/cc/EnergyProductionCC.js +3 -3
- package/build/cc/EnergyProductionCC.js.map +1 -1
- package/build/cc/EntryControlCC.d.ts +4 -3
- package/build/cc/EntryControlCC.d.ts.map +1 -1
- package/build/cc/EntryControlCC.js +9 -9
- package/build/cc/EntryControlCC.js.map +1 -1
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts +9 -8
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/cc/FirmwareUpdateMetaDataCC.js +32 -31
- package/build/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/cc/HumidityControlModeCC.d.ts +2 -1
- package/build/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/cc/HumidityControlModeCC.js +7 -6
- package/build/cc/HumidityControlModeCC.js.map +1 -1
- package/build/cc/HumidityControlSetpointCC.d.ts +5 -4
- package/build/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/cc/HumidityControlSetpointCC.js +21 -20
- package/build/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/cc/InclusionControllerCC.d.ts +3 -2
- package/build/cc/InclusionControllerCC.d.ts.map +1 -1
- package/build/cc/InclusionControllerCC.js +2 -2
- package/build/cc/InclusionControllerCC.js.map +1 -1
- package/build/cc/IndicatorCC.d.ts +8 -7
- package/build/cc/IndicatorCC.d.ts.map +1 -1
- package/build/cc/IndicatorCC.js +17 -16
- package/build/cc/IndicatorCC.js.map +1 -1
- package/build/cc/IrrigationCC.d.ts +10 -9
- package/build/cc/IrrigationCC.d.ts.map +1 -1
- package/build/cc/IrrigationCC.js +25 -24
- package/build/cc/IrrigationCC.js.map +1 -1
- package/build/cc/LanguageCC.d.ts +2 -1
- package/build/cc/LanguageCC.d.ts.map +1 -1
- package/build/cc/LanguageCC.js +11 -7
- package/build/cc/LanguageCC.js.map +1 -1
- package/build/cc/LockCC.d.ts +2 -1
- package/build/cc/LockCC.d.ts.map +1 -1
- package/build/cc/LockCC.js +2 -1
- package/build/cc/LockCC.js.map +1 -1
- package/build/cc/ManufacturerProprietaryCC.d.ts +5 -4
- package/build/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/cc/ManufacturerProprietaryCC.js +14 -13
- package/build/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/cc/ManufacturerSpecificCC.d.ts +3 -2
- package/build/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/cc/ManufacturerSpecificCC.js +14 -13
- package/build/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/cc/MeterCC.d.ts +5 -4
- package/build/cc/MeterCC.d.ts.map +1 -1
- package/build/cc/MeterCC.js +34 -33
- package/build/cc/MeterCC.js.map +1 -1
- package/build/cc/MultiChannelAssociationCC.d.ts +6 -5
- package/build/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/cc/MultiChannelAssociationCC.js +12 -11
- package/build/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/cc/MultiChannelCC.d.ts +10 -9
- package/build/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/cc/MultiChannelCC.js +16 -15
- package/build/cc/MultiChannelCC.js.map +1 -1
- package/build/cc/MultiCommandCC.d.ts +2 -1
- package/build/cc/MultiCommandCC.d.ts.map +1 -1
- package/build/cc/MultiCommandCC.js +4 -3
- package/build/cc/MultiCommandCC.js.map +1 -1
- package/build/cc/MultilevelSensorCC.d.ts +6 -5
- package/build/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/cc/MultilevelSensorCC.js +10 -9
- package/build/cc/MultilevelSensorCC.js.map +1 -1
- package/build/cc/MultilevelSwitchCC.d.ts +5 -4
- package/build/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/cc/MultilevelSwitchCC.js +12 -11
- package/build/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/cc/NodeNamingCC.d.ts +3 -2
- package/build/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/cc/NodeNamingCC.js +31 -20
- package/build/cc/NodeNamingCC.js.map +1 -1
- package/build/cc/NotificationCC.d.ts +9 -8
- package/build/cc/NotificationCC.d.ts.map +1 -1
- package/build/cc/NotificationCC.js +35 -34
- package/build/cc/NotificationCC.js.map +1 -1
- package/build/cc/PowerlevelCC.d.ts +5 -4
- package/build/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/cc/PowerlevelCC.js +11 -10
- package/build/cc/PowerlevelCC.js.map +1 -1
- package/build/cc/ProtectionCC.d.ts +4 -3
- package/build/cc/ProtectionCC.d.ts.map +1 -1
- package/build/cc/ProtectionCC.js +16 -15
- package/build/cc/ProtectionCC.js.map +1 -1
- package/build/cc/SceneActivationCC.d.ts +2 -1
- package/build/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/cc/SceneActivationCC.js +2 -1
- package/build/cc/SceneActivationCC.js.map +1 -1
- package/build/cc/SceneActuatorConfigurationCC.d.ts +3 -2
- package/build/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/cc/SceneActuatorConfigurationCC.js +5 -4
- package/build/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/cc/SceneControllerConfigurationCC.d.ts +3 -2
- package/build/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/cc/SceneControllerConfigurationCC.js +5 -4
- package/build/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/cc/ScheduleEntryLockCC.d.ts +15 -15
- package/build/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/cc/ScheduleEntryLockCC.js +18 -18
- package/build/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/cc/Security2CC.d.ts +25 -24
- package/build/cc/Security2CC.d.ts.map +1 -1
- package/build/cc/Security2CC.js +49 -48
- package/build/cc/Security2CC.js.map +1 -1
- package/build/cc/SecurityCC.d.ts +17 -16
- package/build/cc/SecurityCC.d.ts.map +1 -1
- package/build/cc/SecurityCC.js +26 -25
- package/build/cc/SecurityCC.js.map +1 -1
- package/build/cc/SoundSwitchCC.d.ts +8 -7
- package/build/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/cc/SoundSwitchCC.js +13 -12
- package/build/cc/SoundSwitchCC.js.map +1 -1
- package/build/cc/SupervisionCC.d.ts +3 -2
- package/build/cc/SupervisionCC.d.ts.map +1 -1
- package/build/cc/SupervisionCC.js +8 -7
- package/build/cc/SupervisionCC.js.map +1 -1
- package/build/cc/ThermostatFanModeCC.d.ts +2 -1
- package/build/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/cc/ThermostatFanModeCC.js +8 -7
- package/build/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/cc/ThermostatModeCC.d.ts +9 -8
- package/build/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/cc/ThermostatModeCC.js +25 -24
- package/build/cc/ThermostatModeCC.js.map +1 -1
- package/build/cc/ThermostatSetbackCC.d.ts +3 -2
- package/build/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/cc/ThermostatSetbackCC.js +7 -6
- package/build/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/cc/ThermostatSetpointCC.d.ts +7 -6
- package/build/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/cc/ThermostatSetpointCC.js +21 -20
- package/build/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/cc/TimeCC.d.ts +5 -4
- package/build/cc/TimeCC.d.ts.map +1 -1
- package/build/cc/TimeCC.js +9 -8
- package/build/cc/TimeCC.js.map +1 -1
- package/build/cc/TimeParametersCC.d.ts +2 -1
- package/build/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/cc/TimeParametersCC.js +2 -1
- package/build/cc/TimeParametersCC.js.map +1 -1
- package/build/cc/TransportServiceCC.d.ts +12 -11
- package/build/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/cc/TransportServiceCC.js +22 -21
- package/build/cc/TransportServiceCC.js.map +1 -1
- package/build/cc/UserCodeCC.d.ts +20 -19
- package/build/cc/UserCodeCC.d.ts.map +1 -1
- package/build/cc/UserCodeCC.js +66 -62
- package/build/cc/UserCodeCC.js.map +1 -1
- package/build/cc/VersionCC.d.ts +5 -4
- package/build/cc/VersionCC.d.ts.map +1 -1
- package/build/cc/VersionCC.js +17 -16
- package/build/cc/VersionCC.js.map +1 -1
- package/build/cc/WakeUpCC.d.ts +2 -1
- package/build/cc/WakeUpCC.d.ts.map +1 -1
- package/build/cc/WakeUpCC.js +4 -3
- package/build/cc/WakeUpCC.js.map +1 -1
- package/build/cc/WindowCoveringCC.d.ts +6 -5
- package/build/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/cc/WindowCoveringCC.js +22 -21
- package/build/cc/WindowCoveringCC.js.map +1 -1
- package/build/cc/ZWavePlusCC.d.ts +2 -1
- package/build/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/cc/ZWavePlusCC.js +9 -8
- package/build/cc/ZWavePlusCC.js.map +1 -1
- package/build/cc/ZWaveProtocolCC.d.ts +30 -29
- package/build/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/cc/ZWaveProtocolCC.js +36 -35
- package/build/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts +3 -2
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/cc/manufacturerProprietary/FibaroCC.js +3 -3
- package/build/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/lib/CommandClass.d.ts +9 -9
- package/build/lib/CommandClass.d.ts.map +1 -1
- package/build/lib/CommandClass.js +12 -13
- package/build/lib/CommandClass.js.map +1 -1
- package/build/lib/NotificationEventPayload.d.ts +1 -1
- package/build/lib/NotificationEventPayload.d.ts.map +1 -1
- package/build/lib/NotificationEventPayload.js.map +1 -1
- package/build/lib/Security2/Extension.d.ts +43 -40
- package/build/lib/Security2/Extension.d.ts.map +1 -1
- package/build/lib/Security2/Extension.js +118 -129
- package/build/lib/Security2/Extension.js.map +1 -1
- package/build/lib/_Types.d.ts +1 -1
- package/build/lib/_Types.d.ts.map +1 -1
- package/build/lib/serializers.d.ts +5 -4
- package/build/lib/serializers.d.ts.map +1 -1
- package/build/lib/serializers.js +3 -2
- package/build/lib/serializers.js.map +1 -1
- package/package.json +6 -8
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { CommandClasses, type MessageOrCCLogEntry, SecurityClass, type WithAddress } from "@zwave-js/core";
|
|
2
2
|
import { type MaybeNotKnown, type SecurityManagers } from "@zwave-js/core/safe";
|
|
3
3
|
import type { CCEncodingContext, CCParsingContext, GetValueDB } from "@zwave-js/host/safe";
|
|
4
|
+
import { Bytes } from "@zwave-js/shared/safe";
|
|
4
5
|
import { CCAPI } from "../lib/API";
|
|
5
6
|
import { type CCRaw, CommandClass, type InterviewContext } from "../lib/CommandClass";
|
|
6
7
|
import { Security2Extension } from "../lib/Security2/Extension";
|
|
7
8
|
import { ECDHProfiles, KEXFailType, KEXSchemes } from "../lib/Security2/shared";
|
|
8
9
|
import { Security2Command } from "../lib/_Types";
|
|
9
10
|
export interface DecryptionResult {
|
|
10
|
-
plaintext:
|
|
11
|
+
plaintext: Uint8Array;
|
|
11
12
|
authOK: boolean;
|
|
12
|
-
key?:
|
|
13
|
-
iv?:
|
|
13
|
+
key?: Uint8Array;
|
|
14
|
+
iv?: Uint8Array;
|
|
14
15
|
securityClass: SecurityClass | undefined;
|
|
15
16
|
}
|
|
16
17
|
export declare class Security2CCAPI extends CCAPI {
|
|
@@ -23,7 +24,7 @@ export declare class Security2CCAPI extends CCAPI {
|
|
|
23
24
|
/** Notifies the target node that the MPAN state is out of sync */
|
|
24
25
|
sendMOS(): Promise<boolean>;
|
|
25
26
|
/** Sends the given MPAN to the node */
|
|
26
|
-
sendMPAN(groupId: number, innerMPANState:
|
|
27
|
+
sendMPAN(groupId: number, innerMPANState: Uint8Array): Promise<boolean>;
|
|
27
28
|
/**
|
|
28
29
|
* Queries the securely supported commands for the current security class
|
|
29
30
|
* @param securityClass Can be used to overwrite the security class to use. If this doesn't match the current one, new nonces will need to be exchanged.
|
|
@@ -41,9 +42,9 @@ export declare class Security2CCAPI extends CCAPI {
|
|
|
41
42
|
confirmGrantedKeys(params: Omit<Security2CCKEXSetOptions, "echo">): Promise<Security2CCKEXReport | Security2CCKEXFail | undefined>;
|
|
42
43
|
/** Notifies the other node that the ongoing key exchange was aborted */
|
|
43
44
|
abortKeyExchange(failType: KEXFailType): Promise<void>;
|
|
44
|
-
sendPublicKey(publicKey:
|
|
45
|
+
sendPublicKey(publicKey: Uint8Array, includingNode?: boolean): Promise<void>;
|
|
45
46
|
requestNetworkKey(securityClass: SecurityClass): Promise<void>;
|
|
46
|
-
sendNetworkKey(securityClass: SecurityClass, networkKey:
|
|
47
|
+
sendNetworkKey(securityClass: SecurityClass, networkKey: Uint8Array): Promise<void>;
|
|
47
48
|
verifyNetworkKey(): Promise<void>;
|
|
48
49
|
confirmKeyVerification(): Promise<void>;
|
|
49
50
|
endKeyExchange(): Promise<void>;
|
|
@@ -94,11 +95,11 @@ export declare class Security2CCMessageEncapsulation extends Security2CC {
|
|
|
94
95
|
prepareRetransmission(): void;
|
|
95
96
|
hasMOSExtension(): boolean;
|
|
96
97
|
/** Returns the Sender's Entropy Input if this command contains an SPAN extension */
|
|
97
|
-
getSenderEI():
|
|
98
|
+
getSenderEI(): Uint8Array | undefined;
|
|
98
99
|
/** Returns the multicast group ID if this command contains an MGRP extension */
|
|
99
100
|
getMulticastGroupId(): number | undefined;
|
|
100
101
|
private maybeAddSPANExtension;
|
|
101
|
-
serialize(ctx: CCEncodingContext):
|
|
102
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
102
103
|
protected computeEncapsulationOverhead(): number;
|
|
103
104
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
104
105
|
}
|
|
@@ -107,7 +108,7 @@ export type Security2CCNonceReportOptions = {
|
|
|
107
108
|
} & ({
|
|
108
109
|
MOS: boolean;
|
|
109
110
|
SOS: true;
|
|
110
|
-
receiverEI:
|
|
111
|
+
receiverEI: Uint8Array;
|
|
111
112
|
} | {
|
|
112
113
|
MOS: true;
|
|
113
114
|
SOS: false;
|
|
@@ -120,8 +121,8 @@ export declare class Security2CCNonceReport extends Security2CC {
|
|
|
120
121
|
private ensureSequenceNumber;
|
|
121
122
|
readonly SOS: boolean;
|
|
122
123
|
readonly MOS: boolean;
|
|
123
|
-
readonly receiverEI?:
|
|
124
|
-
serialize(ctx: CCEncodingContext):
|
|
124
|
+
readonly receiverEI?: Uint8Array;
|
|
125
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
125
126
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
126
127
|
}
|
|
127
128
|
export interface Security2CCNonceGetOptions {
|
|
@@ -132,7 +133,7 @@ export declare class Security2CCNonceGet extends Security2CC {
|
|
|
132
133
|
static from(raw: CCRaw, ctx: CCParsingContext): Security2CCNonceGet;
|
|
133
134
|
sequenceNumber: number | undefined;
|
|
134
135
|
private ensureSequenceNumber;
|
|
135
|
-
serialize(ctx: CCEncodingContext):
|
|
136
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
136
137
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
137
138
|
}
|
|
138
139
|
export interface Security2CCKEXReportOptions {
|
|
@@ -152,7 +153,7 @@ export declare class Security2CCKEXReport extends Security2CC {
|
|
|
152
153
|
readonly supportedKEXSchemes: readonly KEXSchemes[];
|
|
153
154
|
readonly supportedECDHProfiles: readonly ECDHProfiles[];
|
|
154
155
|
readonly requestedKeys: readonly SecurityClass[];
|
|
155
|
-
serialize(ctx: CCEncodingContext):
|
|
156
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
156
157
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
157
158
|
}
|
|
158
159
|
export declare class Security2CCKEXGet extends Security2CC {
|
|
@@ -174,7 +175,7 @@ export declare class Security2CCKEXSet extends Security2CC {
|
|
|
174
175
|
selectedKEXScheme: KEXSchemes;
|
|
175
176
|
selectedECDHProfile: ECDHProfiles;
|
|
176
177
|
grantedKeys: SecurityClass[];
|
|
177
|
-
serialize(ctx: CCEncodingContext):
|
|
178
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
178
179
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
179
180
|
}
|
|
180
181
|
export interface Security2CCKEXFailOptions {
|
|
@@ -184,31 +185,31 @@ export declare class Security2CCKEXFail extends Security2CC {
|
|
|
184
185
|
constructor(options: WithAddress<Security2CCKEXFailOptions>);
|
|
185
186
|
static from(raw: CCRaw, ctx: CCParsingContext): Security2CCKEXFail;
|
|
186
187
|
failType: KEXFailType;
|
|
187
|
-
serialize(ctx: CCEncodingContext):
|
|
188
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
188
189
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
189
190
|
}
|
|
190
191
|
export interface Security2CCPublicKeyReportOptions {
|
|
191
192
|
includingNode: boolean;
|
|
192
|
-
publicKey:
|
|
193
|
+
publicKey: Uint8Array;
|
|
193
194
|
}
|
|
194
195
|
export declare class Security2CCPublicKeyReport extends Security2CC {
|
|
195
196
|
constructor(options: WithAddress<Security2CCPublicKeyReportOptions>);
|
|
196
197
|
static from(raw: CCRaw, ctx: CCParsingContext): Security2CCPublicKeyReport;
|
|
197
198
|
includingNode: boolean;
|
|
198
|
-
publicKey:
|
|
199
|
-
serialize(ctx: CCEncodingContext):
|
|
199
|
+
publicKey: Uint8Array;
|
|
200
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
200
201
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
201
202
|
}
|
|
202
203
|
export interface Security2CCNetworkKeyReportOptions {
|
|
203
204
|
grantedKey: SecurityClass;
|
|
204
|
-
networkKey:
|
|
205
|
+
networkKey: Uint8Array;
|
|
205
206
|
}
|
|
206
207
|
export declare class Security2CCNetworkKeyReport extends Security2CC {
|
|
207
208
|
constructor(options: WithAddress<Security2CCNetworkKeyReportOptions>);
|
|
208
209
|
static from(raw: CCRaw, ctx: CCParsingContext): Security2CCNetworkKeyReport;
|
|
209
210
|
grantedKey: SecurityClass;
|
|
210
|
-
networkKey:
|
|
211
|
-
serialize(ctx: CCEncodingContext):
|
|
211
|
+
networkKey: Uint8Array;
|
|
212
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
212
213
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
213
214
|
}
|
|
214
215
|
export interface Security2CCNetworkKeyGetOptions {
|
|
@@ -218,7 +219,7 @@ export declare class Security2CCNetworkKeyGet extends Security2CC {
|
|
|
218
219
|
constructor(options: WithAddress<Security2CCNetworkKeyGetOptions>);
|
|
219
220
|
static from(raw: CCRaw, ctx: CCParsingContext): Security2CCNetworkKeyGet;
|
|
220
221
|
requestedKey: SecurityClass;
|
|
221
|
-
serialize(ctx: CCEncodingContext):
|
|
222
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
222
223
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
223
224
|
}
|
|
224
225
|
export declare class Security2CCNetworkKeyVerify extends Security2CC {
|
|
@@ -232,7 +233,7 @@ export declare class Security2CCTransferEnd extends Security2CC {
|
|
|
232
233
|
static from(raw: CCRaw, ctx: CCParsingContext): Security2CCTransferEnd;
|
|
233
234
|
keyVerified: boolean;
|
|
234
235
|
keyRequestComplete: boolean;
|
|
235
|
-
serialize(ctx: CCEncodingContext):
|
|
236
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
236
237
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
237
238
|
}
|
|
238
239
|
export interface Security2CCCommandsSupportedReportOptions {
|
|
@@ -242,7 +243,7 @@ export declare class Security2CCCommandsSupportedReport extends Security2CC {
|
|
|
242
243
|
constructor(options: WithAddress<Security2CCCommandsSupportedReportOptions>);
|
|
243
244
|
static from(raw: CCRaw, ctx: CCParsingContext): Security2CCCommandsSupportedReport;
|
|
244
245
|
readonly supportedCCs: CommandClasses[];
|
|
245
|
-
serialize(ctx: CCEncodingContext):
|
|
246
|
+
serialize(ctx: CCEncodingContext): Bytes;
|
|
246
247
|
toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
|
|
247
248
|
}
|
|
248
249
|
export declare class Security2CCCommandsSupportedGet extends Security2CC {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Security2CC.d.ts","sourceRoot":"","sources":["../../src/cc/Security2CC.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,cAAc,EAEd,KAAK,mBAAmB,EAQxB,aAAa,EAGb,KAAK,WAAW,EAgBhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEN,KAAK,aAAa,EAGlB,KAAK,gBAAgB,EAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Security2CC.d.ts","sourceRoot":"","sources":["../../src/cc/Security2CC.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,cAAc,EAEd,KAAK,mBAAmB,EAQxB,aAAa,EAGb,KAAK,WAAW,EAgBhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEN,KAAK,aAAa,EAGlB,KAAK,gBAAgB,EAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAI9C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACN,KAAK,KAAK,EAEV,YAAY,EACZ,KAAK,gBAAgB,EACrB,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,EAKN,kBAAkB,EAGlB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA6FjD,MAAM,WAAW,gBAAgB;IAChC,SAAS,EAAE,UAAU,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,EAAE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AiB,GAAG,KAAK;IAKxC,UAAU,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,mBAAmB;CAWxD;AAED,qBAEa,+BAAgC,SAAQ,WAAW;CAAG"}
|
package/build/cc/Security2CC.js
CHANGED
|
@@ -11,6 +11,7 @@ exports.Security2CCCommandsSupportedGet = exports.Security2CCCommandsSupportedRe
|
|
|
11
11
|
const core_1 = require("@zwave-js/core");
|
|
12
12
|
const safe_1 = require("@zwave-js/core/safe");
|
|
13
13
|
const safe_2 = require("@zwave-js/shared/safe");
|
|
14
|
+
const safe_3 = require("@zwave-js/shared/safe");
|
|
14
15
|
const async_1 = require("alcalzone-shared/async");
|
|
15
16
|
const typeguards_1 = require("alcalzone-shared/typeguards");
|
|
16
17
|
const API_1 = require("../lib/API");
|
|
@@ -35,7 +36,7 @@ function getAuthenticationData(sendingNodeId, destination, homeId, commandLength
|
|
|
35
36
|
const nodeIdSize = (0, core_1.isLongRangeNodeId)(sendingNodeId) || (0, core_1.isLongRangeNodeId)(destination)
|
|
36
37
|
? 2
|
|
37
38
|
: 1;
|
|
38
|
-
const ret =
|
|
39
|
+
const ret = new safe_2.Bytes(2 * nodeIdSize + 6 + unencryptedPayload.length);
|
|
39
40
|
let offset = 0;
|
|
40
41
|
ret.writeUIntBE(sendingNodeId, offset, nodeIdSize);
|
|
41
42
|
offset += nodeIdSize;
|
|
@@ -46,7 +47,7 @@ function getAuthenticationData(sendingNodeId, destination, homeId, commandLength
|
|
|
46
47
|
ret.writeUInt16BE(commandLength, offset);
|
|
47
48
|
offset += 2;
|
|
48
49
|
// This includes the sequence number and all unencrypted extensions
|
|
49
|
-
|
|
50
|
+
ret.set(unencryptedPayload, offset);
|
|
50
51
|
return ret;
|
|
51
52
|
}
|
|
52
53
|
function getSecurityManager(ownNodeId, securityManagers, otherNodeId) {
|
|
@@ -200,7 +201,7 @@ function decryptSinglecast(ctx, securityManager, sendingNodeId, curSequenceNumbe
|
|
|
200
201
|
}
|
|
201
202
|
// Nothing worked, fail the decryption
|
|
202
203
|
return {
|
|
203
|
-
plaintext:
|
|
204
|
+
plaintext: new Uint8Array(),
|
|
204
205
|
authOK: false,
|
|
205
206
|
securityClass: undefined,
|
|
206
207
|
};
|
|
@@ -417,7 +418,7 @@ let Security2CCAPI = class Security2CCAPI extends API_1.CCAPI {
|
|
|
417
418
|
});
|
|
418
419
|
const response = await this.host.sendCommand(cc, this.commandOptions);
|
|
419
420
|
if (response) {
|
|
420
|
-
return (0,
|
|
421
|
+
return (0, safe_3.pick)(response, [
|
|
421
422
|
"requestCSA",
|
|
422
423
|
"echo",
|
|
423
424
|
"supportedKEXSchemes",
|
|
@@ -594,14 +595,14 @@ let Security2CC = Security2CC_1 = class Security2CC extends CommandClass_1.Comma
|
|
|
594
595
|
if (!securityManager?.hasKeysForSecurityClass(secClass)) {
|
|
595
596
|
ctx.logNode(node.id, {
|
|
596
597
|
endpoint: endpoint.index,
|
|
597
|
-
message: `Cannot query securely supported commands (${(0,
|
|
598
|
+
message: `Cannot query securely supported commands (${(0, safe_3.getEnumMemberName)(core_1.SecurityClass, secClass)}) - network key is not configured...`,
|
|
598
599
|
level: "warn",
|
|
599
600
|
});
|
|
600
601
|
continue;
|
|
601
602
|
}
|
|
602
603
|
ctx.logNode(node.id, {
|
|
603
604
|
endpoint: endpoint.index,
|
|
604
|
-
message: `Querying securely supported commands (${(0,
|
|
605
|
+
message: `Querying securely supported commands (${(0, safe_3.getEnumMemberName)(core_1.SecurityClass, secClass)})...`,
|
|
605
606
|
direction: "outbound",
|
|
606
607
|
});
|
|
607
608
|
// Query the supported commands but avoid remembering the wrong security class in case of a failure
|
|
@@ -629,7 +630,7 @@ let Security2CC = Security2CC_1 = class Security2CC extends CommandClass_1.Comma
|
|
|
629
630
|
// We definitely know the highest security class
|
|
630
631
|
ctx.logNode(node.id, {
|
|
631
632
|
endpoint: endpoint.index,
|
|
632
|
-
message: `Querying securely supported commands (${(0,
|
|
633
|
+
message: `Querying securely supported commands (${(0, safe_3.getEnumMemberName)(core_1.SecurityClass, secClass)}), attempt ${attempts}/${MAX_ATTEMPTS} failed. Retrying in 500ms...`,
|
|
633
634
|
level: "warn",
|
|
634
635
|
});
|
|
635
636
|
await (0, async_1.wait)(500);
|
|
@@ -638,7 +639,7 @@ let Security2CC = Security2CC_1 = class Security2CC extends CommandClass_1.Comma
|
|
|
638
639
|
else if (endpoint.index > 0) {
|
|
639
640
|
ctx.logNode(node.id, {
|
|
640
641
|
endpoint: endpoint.index,
|
|
641
|
-
message: `Querying securely supported commands (${(0,
|
|
642
|
+
message: `Querying securely supported commands (${(0, safe_3.getEnumMemberName)(core_1.SecurityClass, secClass)}) failed. Assuming the endpoint supports all its mandatory CCs securely...`,
|
|
642
643
|
level: "warn",
|
|
643
644
|
});
|
|
644
645
|
// Just mark all endpoint CCs as secure. Without this we would attempt
|
|
@@ -651,7 +652,7 @@ let Security2CC = Security2CC_1 = class Security2CC extends CommandClass_1.Comma
|
|
|
651
652
|
else {
|
|
652
653
|
ctx.logNode(node.id, {
|
|
653
654
|
endpoint: endpoint.index,
|
|
654
|
-
message: `Querying securely supported commands (${(0,
|
|
655
|
+
message: `Querying securely supported commands (${(0, safe_3.getEnumMemberName)(core_1.SecurityClass, secClass)}) failed. Let's hope for the best...`,
|
|
655
656
|
level: "warn",
|
|
656
657
|
});
|
|
657
658
|
break;
|
|
@@ -669,7 +670,7 @@ let Security2CC = Security2CC_1 = class Security2CC extends CommandClass_1.Comma
|
|
|
669
670
|
// unless we were sure about the security class
|
|
670
671
|
node.setSecurityClass(secClass, false);
|
|
671
672
|
ctx.logNode(node.id, {
|
|
672
|
-
message: `The node was NOT granted the security class ${(0,
|
|
673
|
+
message: `The node was NOT granted the security class ${(0, safe_3.getEnumMemberName)(core_1.SecurityClass, secClass)}`,
|
|
673
674
|
direction: "inbound",
|
|
674
675
|
});
|
|
675
676
|
}
|
|
@@ -679,14 +680,14 @@ let Security2CC = Security2CC_1 = class Security2CC extends CommandClass_1.Comma
|
|
|
679
680
|
// Mark the security class as granted unless we were sure about the security class
|
|
680
681
|
node.setSecurityClass(secClass, true);
|
|
681
682
|
ctx.logNode(node.id, {
|
|
682
|
-
message: `The node was granted the security class ${(0,
|
|
683
|
+
message: `The node was granted the security class ${(0, safe_3.getEnumMemberName)(core_1.SecurityClass, secClass)}`,
|
|
683
684
|
direction: "inbound",
|
|
684
685
|
});
|
|
685
686
|
}
|
|
686
687
|
if (!hasReceivedSecureCommands && supportedCCs.length > 0) {
|
|
687
688
|
hasReceivedSecureCommands = true;
|
|
688
689
|
const logLines = [
|
|
689
|
-
`received secure commands (${(0,
|
|
690
|
+
`received secure commands (${(0, safe_3.getEnumMemberName)(core_1.SecurityClass, secClass)})`,
|
|
690
691
|
"supported CCs:",
|
|
691
692
|
];
|
|
692
693
|
for (const cc of supportedCCs) {
|
|
@@ -900,7 +901,7 @@ let Security2CCMessageEncapsulation = Security2CCMessageEncapsulation_1 = class
|
|
|
900
901
|
}
|
|
901
902
|
const extensionData = buffer.subarray(offset, offset + extensionLength);
|
|
902
903
|
offset += extensionLength;
|
|
903
|
-
const ext = Extension_1.Security2Extension.
|
|
904
|
+
const ext = Extension_1.Security2Extension.parse(extensionData);
|
|
904
905
|
switch ((0, Extension_1.validateS2Extension)(ext, wasEncrypted)) {
|
|
905
906
|
case Extension_1.ValidateS2ExtensionResult.OK:
|
|
906
907
|
if (expectedLength != undefined
|
|
@@ -1170,8 +1171,8 @@ let Security2CCMessageEncapsulation = Security2CCMessageEncapsulation_1 = class
|
|
|
1170
1171
|
this.maybeAddSPANExtension(ctx, securityManager);
|
|
1171
1172
|
const unencryptedExtensions = this.extensions.filter((e) => !e.isEncrypted());
|
|
1172
1173
|
const encryptedExtensions = this.extensions.filter((e) => e.isEncrypted());
|
|
1173
|
-
const unencryptedPayload =
|
|
1174
|
-
|
|
1174
|
+
const unencryptedPayload = safe_2.Bytes.concat([
|
|
1175
|
+
safe_2.Bytes.from([
|
|
1175
1176
|
this.sequenceNumber,
|
|
1176
1177
|
(encryptedExtensions.length > 0 ? 0b10 : 0)
|
|
1177
1178
|
| (unencryptedExtensions.length > 0 ? 1 : 0),
|
|
@@ -1179,8 +1180,8 @@ let Security2CCMessageEncapsulation = Security2CCMessageEncapsulation_1 = class
|
|
|
1179
1180
|
...unencryptedExtensions.map((e, index) => e.serialize(index < unencryptedExtensions.length - 1)),
|
|
1180
1181
|
]);
|
|
1181
1182
|
const serializedCC = this.encapsulated?.serialize(ctx)
|
|
1182
|
-
??
|
|
1183
|
-
const plaintextPayload =
|
|
1183
|
+
?? new safe_2.Bytes();
|
|
1184
|
+
const plaintextPayload = safe_2.Bytes.concat([
|
|
1184
1185
|
...encryptedExtensions.map((e, index) => e.serialize(index < encryptedExtensions.length - 1)),
|
|
1185
1186
|
serializedCC,
|
|
1186
1187
|
]);
|
|
@@ -1216,7 +1217,7 @@ let Security2CCMessageEncapsulation = Security2CCMessageEncapsulation_1 = class
|
|
|
1216
1217
|
this.authData = authData;
|
|
1217
1218
|
this.authTag = authTag;
|
|
1218
1219
|
this.ciphertext = ciphertextPayload;
|
|
1219
|
-
this.payload =
|
|
1220
|
+
this.payload = safe_2.Bytes.concat([
|
|
1220
1221
|
unencryptedPayload,
|
|
1221
1222
|
ciphertextPayload,
|
|
1222
1223
|
authTag,
|
|
@@ -1250,26 +1251,26 @@ let Security2CCMessageEncapsulation = Security2CCMessageEncapsulation_1 = class
|
|
|
1250
1251
|
if (process.env.NODE_ENV === "test"
|
|
1251
1252
|
|| process.env.NODE_ENV === "development") {
|
|
1252
1253
|
if (this.key) {
|
|
1253
|
-
message.key = (0,
|
|
1254
|
+
message.key = (0, safe_3.buffer2hex)(this.key);
|
|
1254
1255
|
}
|
|
1255
1256
|
if (this.iv) {
|
|
1256
|
-
message.IV = (0,
|
|
1257
|
+
message.IV = (0, safe_3.buffer2hex)(this.iv);
|
|
1257
1258
|
}
|
|
1258
1259
|
if (this.ciphertext) {
|
|
1259
|
-
message.ciphertext = (0,
|
|
1260
|
+
message.ciphertext = (0, safe_3.buffer2hex)(this.ciphertext);
|
|
1260
1261
|
}
|
|
1261
1262
|
else if (this.plaintext) {
|
|
1262
|
-
message.plaintext = (0,
|
|
1263
|
+
message.plaintext = (0, safe_3.buffer2hex)(this.plaintext);
|
|
1263
1264
|
}
|
|
1264
1265
|
if (this.authData) {
|
|
1265
|
-
message["auth data"] = (0,
|
|
1266
|
+
message["auth data"] = (0, safe_3.buffer2hex)(this.authData);
|
|
1266
1267
|
}
|
|
1267
1268
|
if (this.authTag) {
|
|
1268
|
-
message["auth tag"] = (0,
|
|
1269
|
+
message["auth tag"] = (0, safe_3.buffer2hex)(this.authTag);
|
|
1269
1270
|
}
|
|
1270
1271
|
}
|
|
1271
1272
|
if (this.securityClass != undefined) {
|
|
1272
|
-
message["security class"] = (0,
|
|
1273
|
+
message["security class"] = (0, safe_3.getEnumMemberName)(core_1.SecurityClass, this.securityClass);
|
|
1273
1274
|
}
|
|
1274
1275
|
return {
|
|
1275
1276
|
...super.toLogEntry(ctx),
|
|
@@ -1339,12 +1340,12 @@ let Security2CCNonceReport = Security2CCNonceReport_1 = class Security2CCNonceRe
|
|
|
1339
1340
|
serialize(ctx) {
|
|
1340
1341
|
const securityManager = assertSecurityTX(ctx, this.nodeId);
|
|
1341
1342
|
this.ensureSequenceNumber(securityManager);
|
|
1342
|
-
this.payload =
|
|
1343
|
+
this.payload = safe_2.Bytes.from([
|
|
1343
1344
|
this.sequenceNumber,
|
|
1344
1345
|
(this.MOS ? 0b10 : 0) + (this.SOS ? 0b1 : 0),
|
|
1345
1346
|
]);
|
|
1346
1347
|
if (this.SOS) {
|
|
1347
|
-
this.payload =
|
|
1348
|
+
this.payload = safe_2.Bytes.concat([this.payload, this.receiverEI]);
|
|
1348
1349
|
}
|
|
1349
1350
|
return super.serialize(ctx);
|
|
1350
1351
|
}
|
|
@@ -1355,7 +1356,7 @@ let Security2CCNonceReport = Security2CCNonceReport_1 = class Security2CCNonceRe
|
|
|
1355
1356
|
MOS: this.MOS,
|
|
1356
1357
|
};
|
|
1357
1358
|
if (this.receiverEI) {
|
|
1358
|
-
message["receiver entropy"] = (0,
|
|
1359
|
+
message["receiver entropy"] = (0, safe_3.buffer2hex)(this.receiverEI);
|
|
1359
1360
|
}
|
|
1360
1361
|
return {
|
|
1361
1362
|
...super.toLogEntry(ctx),
|
|
@@ -1394,7 +1395,7 @@ let Security2CCNonceGet = Security2CCNonceGet_1 = class Security2CCNonceGet exte
|
|
|
1394
1395
|
serialize(ctx) {
|
|
1395
1396
|
const securityManager = assertSecurityTX(ctx, this.nodeId);
|
|
1396
1397
|
this.ensureSequenceNumber(securityManager);
|
|
1397
|
-
this.payload =
|
|
1398
|
+
this.payload = safe_2.Bytes.from([this.sequenceNumber]);
|
|
1398
1399
|
return super.serialize(ctx);
|
|
1399
1400
|
}
|
|
1400
1401
|
toLogEntry(ctx) {
|
|
@@ -1448,8 +1449,8 @@ let Security2CCKEXReport = Security2CCKEXReport_1 = class Security2CCKEXReport e
|
|
|
1448
1449
|
supportedECDHProfiles;
|
|
1449
1450
|
requestedKeys;
|
|
1450
1451
|
serialize(ctx) {
|
|
1451
|
-
this.payload =
|
|
1452
|
-
|
|
1452
|
+
this.payload = safe_2.Bytes.concat([
|
|
1453
|
+
safe_2.Bytes.from([
|
|
1453
1454
|
this._reserved
|
|
1454
1455
|
+ (this.requestCSA ? 0b10 : 0)
|
|
1455
1456
|
+ (this.echo ? 0b1 : 0),
|
|
@@ -1467,14 +1468,14 @@ let Security2CCKEXReport = Security2CCKEXReport_1 = class Security2CCKEXReport e
|
|
|
1467
1468
|
message: {
|
|
1468
1469
|
echo: this.echo,
|
|
1469
1470
|
"supported schemes": this.supportedKEXSchemes
|
|
1470
|
-
.map((s) => `\n· ${(0,
|
|
1471
|
+
.map((s) => `\n· ${(0, safe_3.getEnumMemberName)(shared_1.KEXSchemes, s)}`)
|
|
1471
1472
|
.join(""),
|
|
1472
1473
|
"supported ECDH profiles": this.supportedECDHProfiles
|
|
1473
|
-
.map((s) => `\n· ${(0,
|
|
1474
|
+
.map((s) => `\n· ${(0, safe_3.getEnumMemberName)(shared_1.ECDHProfiles, s)}`)
|
|
1474
1475
|
.join(""),
|
|
1475
1476
|
"CSA requested": this.requestCSA,
|
|
1476
1477
|
"requested security classes": this.requestedKeys
|
|
1477
|
-
.map((s) => `\n· ${(0,
|
|
1478
|
+
.map((s) => `\n· ${(0, safe_3.getEnumMemberName)(core_1.SecurityClass, s)}`)
|
|
1478
1479
|
.join(""),
|
|
1479
1480
|
},
|
|
1480
1481
|
};
|
|
@@ -1550,8 +1551,8 @@ let Security2CCKEXSet = Security2CCKEXSet_1 = class Security2CCKEXSet extends Se
|
|
|
1550
1551
|
selectedECDHProfile;
|
|
1551
1552
|
grantedKeys;
|
|
1552
1553
|
serialize(ctx) {
|
|
1553
|
-
this.payload =
|
|
1554
|
-
|
|
1554
|
+
this.payload = safe_2.Bytes.concat([
|
|
1555
|
+
safe_2.Bytes.from([
|
|
1555
1556
|
this._reserved
|
|
1556
1557
|
+ (this.permitCSA ? 0b10 : 0)
|
|
1557
1558
|
+ (this.echo ? 0b1 : 0),
|
|
@@ -1568,11 +1569,11 @@ let Security2CCKEXSet = Security2CCKEXSet_1 = class Security2CCKEXSet extends Se
|
|
|
1568
1569
|
...super.toLogEntry(ctx),
|
|
1569
1570
|
message: {
|
|
1570
1571
|
echo: this.echo,
|
|
1571
|
-
"selected scheme": (0,
|
|
1572
|
-
"selected ECDH profile": (0,
|
|
1572
|
+
"selected scheme": (0, safe_3.getEnumMemberName)(shared_1.KEXSchemes, this.selectedKEXScheme),
|
|
1573
|
+
"selected ECDH profile": (0, safe_3.getEnumMemberName)(shared_1.ECDHProfiles, this.selectedECDHProfile),
|
|
1573
1574
|
"CSA permitted": this.permitCSA,
|
|
1574
1575
|
"granted security classes": this.grantedKeys
|
|
1575
|
-
.map((s) => `\n· ${(0,
|
|
1576
|
+
.map((s) => `\n· ${(0, safe_3.getEnumMemberName)(core_1.SecurityClass, s)}`)
|
|
1576
1577
|
.join(""),
|
|
1577
1578
|
},
|
|
1578
1579
|
};
|
|
@@ -1598,13 +1599,13 @@ let Security2CCKEXFail = Security2CCKEXFail_1 = class Security2CCKEXFail extends
|
|
|
1598
1599
|
}
|
|
1599
1600
|
failType;
|
|
1600
1601
|
serialize(ctx) {
|
|
1601
|
-
this.payload =
|
|
1602
|
+
this.payload = safe_2.Bytes.from([this.failType]);
|
|
1602
1603
|
return super.serialize(ctx);
|
|
1603
1604
|
}
|
|
1604
1605
|
toLogEntry(ctx) {
|
|
1605
1606
|
return {
|
|
1606
1607
|
...super.toLogEntry(ctx),
|
|
1607
|
-
message: { reason: (0,
|
|
1608
|
+
message: { reason: (0, safe_3.getEnumMemberName)(shared_1.KEXFailType, this.failType) },
|
|
1608
1609
|
};
|
|
1609
1610
|
}
|
|
1610
1611
|
};
|
|
@@ -1631,8 +1632,8 @@ let Security2CCPublicKeyReport = Security2CCPublicKeyReport_1 = class Security2C
|
|
|
1631
1632
|
includingNode;
|
|
1632
1633
|
publicKey;
|
|
1633
1634
|
serialize(ctx) {
|
|
1634
|
-
this.payload =
|
|
1635
|
-
|
|
1635
|
+
this.payload = safe_2.Bytes.concat([
|
|
1636
|
+
safe_2.Bytes.from([this.includingNode ? 1 : 0]),
|
|
1636
1637
|
this.publicKey,
|
|
1637
1638
|
]);
|
|
1638
1639
|
return super.serialize(ctx);
|
|
@@ -1642,7 +1643,7 @@ let Security2CCPublicKeyReport = Security2CCPublicKeyReport_1 = class Security2C
|
|
|
1642
1643
|
...super.toLogEntry(ctx),
|
|
1643
1644
|
message: {
|
|
1644
1645
|
"is including node": this.includingNode,
|
|
1645
|
-
"public key": (0,
|
|
1646
|
+
"public key": (0, safe_3.buffer2hex)(this.publicKey),
|
|
1646
1647
|
},
|
|
1647
1648
|
};
|
|
1648
1649
|
}
|
|
@@ -1670,7 +1671,7 @@ let Security2CCNetworkKeyReport = Security2CCNetworkKeyReport_1 = class Security
|
|
|
1670
1671
|
grantedKey;
|
|
1671
1672
|
networkKey;
|
|
1672
1673
|
serialize(ctx) {
|
|
1673
|
-
this.payload =
|
|
1674
|
+
this.payload = safe_2.Bytes.concat([
|
|
1674
1675
|
securityClassToBitMask(this.grantedKey),
|
|
1675
1676
|
this.networkKey,
|
|
1676
1677
|
]);
|
|
@@ -1680,7 +1681,7 @@ let Security2CCNetworkKeyReport = Security2CCNetworkKeyReport_1 = class Security
|
|
|
1680
1681
|
return {
|
|
1681
1682
|
...super.toLogEntry(ctx),
|
|
1682
1683
|
message: {
|
|
1683
|
-
"security class": (0,
|
|
1684
|
+
"security class": (0, safe_3.getEnumMemberName)(core_1.SecurityClass, this.grantedKey),
|
|
1684
1685
|
// This shouldn't be logged, so users can safely post their logs online
|
|
1685
1686
|
// "network key": buffer2hex(this.networkKey),
|
|
1686
1687
|
},
|
|
@@ -1713,7 +1714,7 @@ let Security2CCNetworkKeyGet = Security2CCNetworkKeyGet_1 = class Security2CCNet
|
|
|
1713
1714
|
return {
|
|
1714
1715
|
...super.toLogEntry(ctx),
|
|
1715
1716
|
message: {
|
|
1716
|
-
"security class": (0,
|
|
1717
|
+
"security class": (0, safe_3.getEnumMemberName)(core_1.SecurityClass, this.requestedKey),
|
|
1717
1718
|
},
|
|
1718
1719
|
};
|
|
1719
1720
|
}
|
|
@@ -1749,7 +1750,7 @@ let Security2CCTransferEnd = Security2CCTransferEnd_1 = class Security2CCTransfe
|
|
|
1749
1750
|
keyVerified;
|
|
1750
1751
|
keyRequestComplete;
|
|
1751
1752
|
serialize(ctx) {
|
|
1752
|
-
this.payload =
|
|
1753
|
+
this.payload = safe_2.Bytes.from([
|
|
1753
1754
|
(this.keyVerified ? 0b10 : 0) + (this.keyRequestComplete ? 0b1 : 0),
|
|
1754
1755
|
]);
|
|
1755
1756
|
return super.serialize(ctx);
|