networkcache SHOULD NOT complain if no signature is given

parent 724f7321
...@@ -283,10 +283,13 @@ class NetworkcacheClient(object): ...@@ -283,10 +283,13 @@ class NetworkcacheClient(object):
raise DirectoryNotFound('It was impossible to parse json response:\n%s'% raise DirectoryNotFound('It was impossible to parse json response:\n%s'%
traceback.format_exc()) traceback.format_exc())
filtered_data_list = [] filtered_data_list = []
for data in data_list: if self.signature_certificate_list is not None:
if len(data[1]): for data in data_list:
if self._verifySignatureInCertificateList(data[0], data[1]): if len(data[1]):
filtered_data_list.append(data) if self._verifySignatureInCertificateList(data[0], data[1]):
filtered_data_list.append(data)
else:
filtered_data_list = data_list
if len(filtered_data_list) == 0: if len(filtered_data_list) == 0:
raise DirectoryNotFound('Could not find a trustable entry.') raise DirectoryNotFound('Could not find a trustable entry.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment