1
0
mirror of https://github.com/moepman/acertmgr.git synced 2024-06-02 04:12:33 +02:00
Commit Graph

22 Commits

Author SHA1 Message Date
Kishi85
2e1f5cd894 acertmgr/v2: Handle CA certificate chains properly 2021-05-21 22:50:44 +02:00
Kishi85
1a4272f11a authority.v2: invalidate nonces after 2 minutes and re-request
Boulder seems to invalidate older nonces after some time. Therefore we
allow nonces from the cache to be used for up to 2 minutes and after
those they will be considered invalid (and re-requested with an extra
request to the nonce endpoint when necessary)
2019-06-21 11:39:10 +02:00
Kishi85
af0bb45d73 authority.v2: Properly clear the nonce cache on using it's content 2019-06-11 09:52:55 +02:00
Kishi85
7475d5e73f authority.v2: Check challenge return code on validation as well 2019-06-11 09:52:55 +02:00
Kishi85
7c9e7f7d0c authority.v2: use POST-as-GET to remove unauthenticated GET requests
As unauthenticated GET requests are soon to be deprecated,
remove all unacceptable usages and replace with POST-as-GET.
See also https://tools.ietf.org/html/rfc8555#section-6.3
2019-04-07 15:31:07 +02:00
Kishi85
e12abbc3cb authority.v1/2: call stop_challenge even if start_challenge fails
start_challenge may raise an exception at any point. to not just destroy
the challenge but also try to stop it in order to clean up anything done
by start_challenge already properly
2019-04-07 15:31:07 +02:00
Kishi85
989d3b585a authority.v1/2: do not re-authorize already valid domains
Skipping re-authorization when not necessary speeds up cert renewal.
2019-04-07 15:31:07 +02:00
Kishi85
fd8c4ec443 authority.v2: cleanup error- and encoding-handling 2019-04-07 15:31:07 +02:00
Kishi85
b63a0bc424 tools: add log function, update log messages mentioning certificates
This simple implementation writes log messages to stdout/err and flushes
the buffers immediately after the message has been written.

Also update log messages with the certificate CN to a better readable format
Introduce functions for get_cert_cn and get_cert_valid_until to
encapsulate all cryptographic functions consistently in tools.
2019-04-07 15:31:06 +02:00
Kishi85
2046215e37 tools: encapsulate key parameter determination in tools function
This is will isolate more cryptographic functions in the tools module
and allow for easier replacement of any cryptographic function should
the need ever arise
2019-04-07 15:31:02 +02:00
Kishi85
1aae651d98 modes: unify and optimize challenge handler workflow
- Remove wait times returned by create_challenge
- Remove wait loops from authorities
- Add the wait for valid DNS TXT records in the abstract
  DNSChallengeHandler start_challenge function.
- Move challenge verification to start_challenge in general
2019-04-04 13:39:34 +02:00
Kishi85
ba9e206423 authority.v[12]: skip subsequent account registration 2019-03-28 09:48:54 +01:00
Kishi85
737578159b acertmgr: Add support for account.key based certificate revocation 2019-03-28 00:53:54 +01:00
Kishi85
7da3c266a7 authority.v2: optimize code paths (raw_result, nonce)
raw_result does not need an extra return, dicarding the nonce at that
point would discard the newer nonce from the response and also the first
nonce is gotten implicitly with the first request acme anyway
2019-03-27 14:22:16 +01:00
Kishi85
fd2134753a tools: cleanup function names and add crypto wrappers 2019-03-24 16:49:03 +01:00
Kishi85
c0d23631b6 tools: add wrapper for urlopen and use it throughout acertmgr 2019-03-22 16:09:21 +01:00
Kishi85
985bc46f39 authority.v2: always cache next nonce if it is present 2019-03-22 15:54:48 +01:00
Kishi85
83f31bf91d acertmgr: cleanup code (PEP-8 + replace assertions) 2019-03-22 12:45:34 +01:00
Kishi85
d62afac9d6 authority.v2: Guess directory data if retrieval fails 2019-03-22 12:22:17 +01:00
Kishi85
c054ecebe9 acertmgr: change the way the issuer CA is fetched
This changes the way the issuer CA is retrieved if no static_ca file is
used. Previously we would always download the CA using the AIA Info but
API v2 provides normally the full chain PEM upon certificate retrieval
and does not need this step. For the APIv2 case we now use the CA
provided with the certificate which required some changes to the basic
handling of CA files. APIv1 has been adapted to this new handling.
APIv2 has a fallback option to the way APIv1 handles it in case no CA
has been provided.
2019-03-21 12:26:32 +01:00
Kishi85
316ecdba2e configuration: Force user to agree to the authorities Terms of Service
Authorities (e.g. Let's Encrypt) usually have Terms of Serivce (ToS)
that have to be agreed to. Up until this point we automatically
indicated agreement to those ToS and sent the necessary value.

This commit changes the behaviour to be in line with recommendations
from Let's Encrypt that the user themselves have to indicate their
agreement by no longer automatically doing so (except for cases of
legacy configuration files to provide compatibility).

The user can now indicate ToS agreement by either setting the associated
configuration variable (authority_tos_agreement) to the required value
and/or providing the required value via a command-line parameter
(--authority-tos-agreement=<value>/--tos-agreement=<value>/--tos=<value>)
2019-03-20 15:31:53 +01:00
Kishi85
530256ecec authority.v2: Add ACMEv2 API implementation 2019-03-20 15:31:48 +01:00