From 4f2a8f86d888599a7bb12ece864fb9737b6e801f Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Mon, 13 Jun 2016 11:52:36 -0700 Subject: [PATCH] Remove unnecessary check on registration returned. Right now the ACME client checks that the returned registration matches the registation posted, but there's no guarantee this will always be the case, and this only introduces unnecessary fragility. --- acme/acme/client.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/acme/acme/client.py b/acme/acme/client.py index 117ee6b7d..de7eef299 100644 --- a/acme/acme/client.py +++ b/acme/acme/client.py @@ -89,8 +89,6 @@ class Client(object): # pylint: disable=too-many-instance-attributes :returns: Registration Resource. :rtype: `.RegistrationResource` - :raises .UnexpectedUpdate: - """ new_reg = messages.NewRegistration() if new_reg is None else new_reg assert isinstance(new_reg, messages.NewRegistration) @@ -101,12 +99,7 @@ class Client(object): # pylint: disable=too-many-instance-attributes # "Instance of 'Field' has no key/contact member" bug: # pylint: disable=no-member - regr = self._regr_from_response(response) - if (regr.body.key != self.key.public_key() or - regr.body.contact != new_reg.contact): - raise errors.UnexpectedUpdate(regr) - - return regr + return self._regr_from_response(response) def _send_recv_regr(self, regr, body): response = self.net.post(regr.uri, body)