mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-26 15:30:18 +00:00
Added link error handling.
This commit is contained in:
parent
ad9f548eeb
commit
6373f159f8
@ -700,7 +700,11 @@ class Link:
|
|||||||
def encrypt(self, plaintext):
|
def encrypt(self, plaintext):
|
||||||
try:
|
try:
|
||||||
if not self.fernet:
|
if not self.fernet:
|
||||||
|
try:
|
||||||
self.fernet = Fernet(base64.urlsafe_b64encode(self.derived_key))
|
self.fernet = Fernet(base64.urlsafe_b64encode(self.derived_key))
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Could not "+str(self)+" instantiate Fernet while performin encryption on link. The contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
raise e
|
||||||
|
|
||||||
# The fernet token VERSION field is stripped here and
|
# The fernet token VERSION field is stripped here and
|
||||||
# reinserted on the receiving end, since it is always
|
# reinserted on the receiving end, since it is always
|
||||||
|
Loading…
Reference in New Issue
Block a user