mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
The hosting and consuming data store is now signed.
This commit is contained in:
parent
2ba96ede89
commit
1e514b57c5
@ -157,6 +157,7 @@ class Unwrapper(object):
|
||||
|
||||
self.type = msg_type
|
||||
self.message = "".join(Unwrapper.unwrap(self.body, self.type)).lstrip()
|
||||
self.gpg_data.message = self.message
|
||||
|
||||
return self.gpg_data
|
||||
|
||||
|
||||
@ -501,7 +501,15 @@ class Santiago(object):
|
||||
logging.exception(e)
|
||||
data = dict()
|
||||
|
||||
# FIXME add Unwrapping
|
||||
for message in pgpprocessor.Unwrapper(data, gpg=self.gpg):
|
||||
try:
|
||||
data = dict(ast.literal_eval(message.message))
|
||||
except ValueError as e:
|
||||
logging.exception(e)
|
||||
continue
|
||||
|
||||
logging.debug("santiago.Santiago.load_data: found {0}: {1}".format(
|
||||
key, data))
|
||||
|
||||
data = Santiago.convert_data(data, set)
|
||||
|
||||
@ -529,7 +537,7 @@ class Santiago(object):
|
||||
|
||||
data = Santiago.convert_data(data, list)
|
||||
|
||||
# FIXME add signing
|
||||
data = str(self.gpg.sign(str(data), keyid=self.me))
|
||||
|
||||
self.shelf[key] = data
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user