mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 15:52:08 -04:00
client.errors.UnexpectedUpdate
This commit is contained in:
parent
2b4b86a41b
commit
144baf64fe
2 changed files with 13 additions and 1 deletions
|
|
@ -5,6 +5,14 @@ class LetsEncryptClientError(Exception):
|
|||
"""Generic Let's Encrypt client error."""
|
||||
|
||||
|
||||
class NetworkError(LetsEncryptClientError):
|
||||
"""Network error."""
|
||||
|
||||
|
||||
class UnexpectedUpdate(NetworkError):
|
||||
"""Unexpected update."""
|
||||
|
||||
|
||||
class LetsEncryptReverterError(LetsEncryptClientError):
|
||||
"""Let's Encrypt Reverter error."""
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import requests
|
|||
from letsencrypt.acme import jose
|
||||
from letsencrypt.acme import messages2
|
||||
|
||||
from letsencrypt.client import errors
|
||||
|
||||
|
||||
class Network(object):
|
||||
"""ACME networking.
|
||||
|
|
@ -47,7 +49,9 @@ class Network(object):
|
|||
uri=response.headers['location'],
|
||||
new_authz_uri=response.links['next']['url'],
|
||||
terms_of_service=terms_of_service)
|
||||
assert regr.body.key == self.key.public()
|
||||
|
||||
if regr.body.key != self.key.public() or regr.body.contact != contact:
|
||||
raise errors.UnexpectedUpdate(regr)
|
||||
|
||||
return regr
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue