mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-10-01 03:15:44 -04:00
Added link error handling.
This commit is contained in:
parent
ad9f548eeb
commit
6373f159f8
@ -700,7 +700,11 @@ class Link:
|
||||
def encrypt(self, plaintext):
|
||||
try:
|
||||
if not self.fernet:
|
||||
try:
|
||||
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
|
||||
# reinserted on the receiving end, since it is always
|
||||
|
Loading…
Reference in New Issue
Block a user