mirror of https://github.com/nucypher/nucypher.git
Moving node_information to client for last minute verification.
parent
f3e8ff6e63
commit
b2275dc366
|
@ -74,6 +74,14 @@ class NucypherMiddlewareClient:
|
||||||
No cleaning needed.
|
No cleaning needed.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
def node_information(self, host, port, certificate_filepath=None):
|
||||||
|
response = self.get(node_or_sprout=EXEMPT_FROM_VERIFICATION.bool_value(False),
|
||||||
|
host=host, port=port,
|
||||||
|
path="public_information",
|
||||||
|
timeout=2,
|
||||||
|
certificate_filepath=certificate_filepath)
|
||||||
|
return response.content
|
||||||
|
|
||||||
def __getattr__(self, method_name):
|
def __getattr__(self, method_name):
|
||||||
# Quick sanity check.
|
# Quick sanity check.
|
||||||
if not method_name in ("post", "get", "put", "patch", "delete"):
|
if not method_name in ("post", "get", "put", "patch", "delete"):
|
||||||
|
@ -208,13 +216,6 @@ class RestMiddleware:
|
||||||
path=f"kFrag/{id_as_hex}/reencrypt",
|
path=f"kFrag/{id_as_hex}/reencrypt",
|
||||||
data=payload, timeout=2)
|
data=payload, timeout=2)
|
||||||
|
|
||||||
def node_information(self, host, port, certificate_filepath=None):
|
|
||||||
response = self.client.get(host=host, port=port,
|
|
||||||
path="public_information",
|
|
||||||
timeout=2,
|
|
||||||
certificate_filepath=certificate_filepath)
|
|
||||||
return response.content
|
|
||||||
|
|
||||||
def get_nodes_via_rest(self,
|
def get_nodes_via_rest(self,
|
||||||
node,
|
node,
|
||||||
announce_nodes=None,
|
announce_nodes=None,
|
||||||
|
|
Loading…
Reference in New Issue