mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Changes following the hashCode of the deviceId being used as the certificate alias
This commit is contained in:
parent
fa454388ac
commit
dca55d692c
@ -25,7 +25,7 @@ public class VirtualFirealarmMqttContentTransformer implements ContentTransforme
|
|||||||
Long serialNo = (Long) jsonPayload.get(VirtualFireAlarmConstants.JSON_SERIAL_KEY);
|
Long serialNo = (Long) jsonPayload.get(VirtualFireAlarmConstants.JSON_SERIAL_KEY);
|
||||||
// the hash-code of the deviceId is used as the alias for device certificates during SCEP enrollment.
|
// the hash-code of the deviceId is used as the alias for device certificates during SCEP enrollment.
|
||||||
// hence, the same is used here to fetch the device-specific-certificate from the key store.
|
// hence, the same is used here to fetch the device-specific-certificate from the key store.
|
||||||
PublicKey clientPublicKey = VirtualFireAlarmUtils.getDevicePublicKey("" + serialNo);
|
PublicKey clientPublicKey = VirtualFireAlarmUtils.getDevicePublicKey("" + serialNo.hashCode());
|
||||||
|
|
||||||
// the MQTT-messages from VirtualFireAlarm devices are in the form {"Msg":<MESSAGE>, "Sig":<SIGNATURE>}
|
// the MQTT-messages from VirtualFireAlarm devices are in the form {"Msg":<MESSAGE>, "Sig":<SIGNATURE>}
|
||||||
String actualMessage = VirtualFireAlarmUtils.extractMessageFromPayload((String) message, clientPublicKey);
|
String actualMessage = VirtualFireAlarmUtils.extractMessageFromPayload((String) message, clientPublicKey);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user