mirror of
https://github.com/markqvist/LXMF.git
synced 2025-02-26 01:41:16 -05:00
Updated according to RNS API.
This commit is contained in:
parent
4d3e529e63
commit
6cb3a23c9d
26
LXMF/LXMF.py
26
LXMF/LXMF.py
@ -542,22 +542,18 @@ class LXMRouter:
|
|||||||
try:
|
try:
|
||||||
message = LXMessage.unpack_from_bytes(lxmf_data)
|
message = LXMessage.unpack_from_bytes(lxmf_data)
|
||||||
|
|
||||||
if RNS.Reticulum.should_allow_unencrypted():
|
if destination_type == RNS.Destination.SINGLE:
|
||||||
message.transport_encrypted = False
|
message.transport_encrypted = True
|
||||||
message.transport_encryption = LXMessage.ENCRYPTION_DESCRIPTION_UNENCRYPTED
|
message.transport_encryption = LXMessage.ENCRYPTION_DESCRIPTION_RSA
|
||||||
|
elif destination_type == RNS.Destination.GROUP:
|
||||||
|
message.transport_encrypted = True
|
||||||
|
message.transport_encryption = LXMessage.ENCRYPTION_DESCRIPTION_AES
|
||||||
|
elif destination_type == RNS.Destination.LINK:
|
||||||
|
message.transport_encrypted = True
|
||||||
|
message.transport_encryption = LXMessage.ENCRYPTION_DESCRIPTION_EC
|
||||||
else:
|
else:
|
||||||
if destination_type == RNS.Destination.SINGLE:
|
message.transport_encrypted = False
|
||||||
message.transport_encrypted = True
|
message.transport_encryption = None
|
||||||
message.transport_encryption = LXMessage.ENCRYPTION_DESCRIPTION_RSA
|
|
||||||
elif destination_type == RNS.Destination.GROUP:
|
|
||||||
message.transport_encrypted = True
|
|
||||||
message.transport_encryption = LXMessage.ENCRYPTION_DESCRIPTION_AES
|
|
||||||
elif destination_type == RNS.Destination.LINK:
|
|
||||||
message.transport_encrypted = True
|
|
||||||
message.transport_encryption = LXMessage.ENCRYPTION_DESCRIPTION_EC
|
|
||||||
else:
|
|
||||||
message.transport_encrypted = False
|
|
||||||
message.transport_encryption = None
|
|
||||||
|
|
||||||
if self.__delivery_callback != None:
|
if self.__delivery_callback != None:
|
||||||
self.__delivery_callback(message)
|
self.__delivery_callback(message)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user