Commit f573e286 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

libnetworkcache: make verification method public

Move `_verifySignatureInCertificateList` to a public method
parent 2a079ea3
...@@ -421,7 +421,7 @@ class NetworkcacheClient(object): ...@@ -421,7 +421,7 @@ class NetworkcacheClient(object):
raise NetworkcacheException('Failed to parse json response (%r)' % data) raise NetworkcacheException('Failed to parse json response (%r)' % data)
if filter: if filter:
return (data for data in data_list return (data for data in data_list
if self._verifySignatureInCertificateList(*data)) if self.verifySignatureInCertificateList(*data))
return data_list return data_list
def _getSignatureString(self, content): def _getSignatureString(self, content):
...@@ -433,7 +433,7 @@ class NetworkcacheClient(object): ...@@ -433,7 +433,7 @@ class NetworkcacheClient(object):
return '' return ''
return b64encode(crypto.sign(k, content, 'sha1')).decode() return b64encode(crypto.sign(k, content, 'sha1')).decode()
def _verifySignatureInCertificateList(self, content, signature_string): def verifySignatureInCertificateList(self, content, signature_string):
""" """
Returns true if it can find any valid certificate or false if it does not Returns true if it can find any valid certificate or false if it does not
find any. find any.
......
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