Implemented elliptic curve signatures and verify on links, auto proofs on links

This commit is contained in:
Mark Qvist 2018-04-25 22:08:17 +02:00
parent dc86f6884a
commit d69f3c2c34
7 changed files with 127 additions and 28 deletions

View file

@ -56,10 +56,13 @@ class Identity:
@staticmethod
def loadKnownDestinations():
if os.path.isfile(RNS.Reticulum.storagepath+"/known_destinations"):
file = open(RNS.Reticulum.storagepath+"/known_destinations","r")
Identity.known_destinations = umsgpack.load(file)
file.close()
RNS.log("Loaded "+str(len(Identity.known_destinations))+" known destinations from storage", RNS.LOG_VERBOSE)
try:
file = open(RNS.Reticulum.storagepath+"/known_destinations","r")
Identity.known_destinations = umsgpack.load(file)
file.close()
RNS.log("Loaded "+str(len(Identity.known_destinations))+" known destinations from storage", RNS.LOG_VERBOSE)
except:
RNS.log("Error loading known destinations from disk, file will be recreated on exit", RNS.LOG_ERROR)
else:
RNS.log("Destinations file does not exist, so no known destinations loaded", RNS.LOG_VERBOSE)