mirror of
https://github.com/certbot/certbot.git
synced 2026-01-21 19:01:07 +03:00
Save accounts to:
/etc/letsencrypt/accounts/www.letsencrypt-dmeo.org/acme/new-reg/ \
kuba.le.wtf@2015-07-04T14:04:10Z/ \
{regr.json,meta.json,private_key.json}
Account now represents a combination of private key, Registration
Resource and client account metadata. `Account.id` based on the
account metadata (creation host and datetime). UI interface
(`cli._determine_account`) based on the `id`, and not on email as
previously.
Add `AccountStorage` interface and `AccountFileStorage`,
`AccountMemoryStorage` implementations (latter, in-memory, useful for
testing).
Create Account only after Registration Resource is received
(`register()` returns `Account`).
Allow `client.Client(..., acme=acme, ...)`: API client might reuse
acme.client.Client as returned by `register()`.
Move report_new_account to letsencrypt.account, client.Client.register
into client.register.
Use Registration.from_data acme API.
achallenges.AChallenge.key is now the `acme.jose.JWK`, not
`le_util.Key`. Plugins have to export PEM/DER as necessary
(c.f. `letsencrypt.plugins.common.Dvsni.get_key_path`)
Add --agree-tos, save --agree-eula to "args.eula". Prompt for EULA as
soon as client is launched, add prompt for TOS.
Remove unnecessary letsencrypt.network. Remove, now irrelevant,
`IConfig.account_keys_dir`.
Based on the draft from
https://github.com/letsencrypt/letsencrypt/pull/362#issuecomment-97946817.
71 lines
1.6 KiB
Python
71 lines
1.6 KiB
Python
"""Let's Encrypt client errors."""
|
|
|
|
|
|
class Error(Exception):
|
|
"""Generic Let's Encrypt client error."""
|
|
|
|
|
|
class AccountStorageError(Error):
|
|
"""Generic `.AccountStorage` error."""
|
|
|
|
|
|
class AccountNotFound(AccountStorageError):
|
|
"""Account not found error."""
|
|
|
|
|
|
class ReverterError(Error):
|
|
"""Let's Encrypt Reverter error."""
|
|
|
|
|
|
# Auth Handler Errors
|
|
class AuthorizationError(Error):
|
|
"""Authorization error."""
|
|
|
|
|
|
class FailedChallenges(AuthorizationError):
|
|
"""Failed challenges error.
|
|
|
|
:ivar set failed_achalls: Failed `.AnnotatedChallenge` instances.
|
|
|
|
"""
|
|
def __init__(self, failed_achalls):
|
|
assert failed_achalls
|
|
self.failed_achalls = failed_achalls
|
|
super(FailedChallenges, self).__init__()
|
|
|
|
def __str__(self):
|
|
return "Failed authorization procedure. {0}".format(
|
|
", ".join(
|
|
"{0} ({1}): {2}".format(achall.domain, achall.typ, achall.error)
|
|
for achall in self.failed_achalls if achall.error is not None))
|
|
|
|
|
|
class ContAuthError(AuthorizationError):
|
|
"""Let's Encrypt Continuity Authenticator error."""
|
|
|
|
|
|
class DvAuthError(AuthorizationError):
|
|
"""Let's Encrypt DV Authenticator error."""
|
|
|
|
|
|
# Authenticator - Challenge specific errors
|
|
class DvsniError(DvAuthError):
|
|
"""Let's Encrypt DVSNI error."""
|
|
|
|
|
|
# Plugin Errors
|
|
class PluginError(Error):
|
|
"""Let's Encrypt Plugin error."""
|
|
|
|
|
|
class NoInstallationError(PluginError):
|
|
"""Let's Encrypt No Installation error."""
|
|
|
|
|
|
class MisconfigurationError(PluginError):
|
|
"""Let's Encrypt Misconfiguration error."""
|
|
|
|
|
|
class RevokerError(Error):
|
|
"""Let's Encrypt Revoker error."""
|