Commit Graph

23 Commits

Author SHA1 Message Date
Peter Putzer e12095b0b9 uacme: Add support custom CAs and TLS-ALPN-01 challenge
Signed-off-by: Peter Putzer <openwrt@mundschenk.at>
2024-03-09 19:40:39 +08:00
Lucian Cristian 3b7bf7728b uacme: update to 1.7.4
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2023-02-25 08:19:49 +08:00
Antti Seppälä 96b2cd70e1 uacme: Remove deprecated $(AUTORELEASE)
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
2022-12-22 09:52:01 +08:00
Antti Seppälä dd00cd04c5 uacme: Use UCI to configure firewall instead of iptables
Use UCI to add temporary incoming firewall rule to accept http traffic for
challenge verification.

This should make uacme compatible with OpenWrt's fw3/4 implementation.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
2022-12-22 09:52:01 +08:00
Lucian Cristian 7fdaa56205 uacme: update to 1.7.3
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2022-10-21 15:08:46 -07:00
Eneas U de Queiroz 1642b68d45 uacme: add libev dependency to uacme-ualpn
The dependency has a PACKAGE_uacme-ualpn condition so that libev won't
be unnecessarily built if uacme-ualpn is not selected.

Remove PKG_USE_MIPS16:=0, as it is not necessary when not using the
libev that is bundled with uacme.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-04-09 14:45:57 -03:00
Lucian Cristian c289a274fe uacme: always include ualpn
with mbetls update we can have ualpn on any variant

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2022-03-28 19:43:22 -07:00
Lucian Cristian 58aa97cb8f uacme: proper ualpn integration
ualpn works only with openssl and gnutls, so default build will not have this included

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2022-02-17 19:29:24 -08:00
Lucian Cristian ce5755cc0b uacme: pack ualpn.sh
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2022-02-16 22:16:46 -08:00
Rosen Penev 4a80f0c66e uacme: update to 1.7.1
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-07-21 00:24:06 -07:00
Leonardo Mörlein 7d17bbdc41 uacme: add use_auto_staging
Staging certificates have the advantage that their retry limits are loose.
Therefore they can be obtained quickly when automatic retries are used.
Unfortunately they can not be used for deployments because their CA is not
accepted by clients. Production certificates do not have this limitation, but
their retry limits are strict. For production certificates, automatic retries
can only be performed a few times per hour. This makes automatic obtainment of
certificates tenacious.

With use_auto_staging=1, the advantages of the two certificate types are
combined. Uacme will first obtain a staging certificate. When the staging
certificate is successfully obtained, uacme will switch and obtain a production
certificate. Since the staging certificate has already been successfully
obtained, we can ensure that the production certificate is successfully
obtained in the first attempt. This means that "retries" are performed on the
staging certificate and the production certificate is obtained in the first
attempt.

In summary, this feature enables fast obtaining of production certificates when
automatic retries are used.

By default, this feature is set to use_auto_staging=0, which means that
uacme will behave as before by default.

Signed-off-by: Leonardo Mörlein <git@irrelefant.net>
2021-04-24 01:16:57 -07:00
Leonardo Mörlein b80781150b uacme: do not override production state dir variable
With this commit, issue_cert() can be called multiple times alternating
between staging and production certificates within a script.

Before this commit, the production state dir was stored in $STATE_DIR.
But in the case of $use_staging=1, this variable was overwritten in
issue_cert() with $STAGING_STATE_DIR. This made it impossible to call
issue_cert() with $use_staging=0 afterwards. Now the production state
dir is stored in $PRODUCTION_STATE_DIR. This way it is not overridden
anymore and issue_cert() can be called multiple times alternating with
production and staging.

Signed-off-by: Leonardo Mörlein <git@irrelefant.net>
2021-04-24 01:16:57 -07:00
Leonardo Mörlein 24ddf22073 uacme: add retries
Prior to this commit, the acme service attempted to obtain certificates
once and then terminated, regardless of whether the certificate could be
obtained or not. This commit introduces a new uci option "retries" to
the "certificate" section. If this option is set to N, the acme service
will attempt to obtain the certificate up to N times before terminating.
There is a waiting pause between the retries to comply with the rate
limits of Let'sEncrypt.

The waiting pause is:
-  2 minutes for staging certificates
- 24 minutes for production certificates

The current "Failed Validation" rate limits of Let'sEncrypt are:
- staging:   60 per hour -> 1 failure every 1 minute in avg.
- production: 5 per hour -> 1 failure every 12 minutes in avg.

This means that we are within rate limits by a factor of two.

By default the option "retries" is set to "1", which means that acme
behaves as before by default. If the variable is set to "0", infinite
retries are performed.

This feature is helpful, when you already want to initiate the
certificate request, but you are still waiting for your dns server to be
configured, your network to appear or other conditions.

Signed-off-by: Leonardo Mörlein <git@irrelefant.net>
2021-04-04 22:16:02 -07:00
Leonardo Mörlein 9a6c2339b0 uacme: propagate rc of uacme in issue_cert()
Before this commit, issue_cert always returned 1 no matter if uacme
returned 1, 2, 3, ... With this commit, the return code of the uacme
binary is propagated. Therefore the caller of issue_cert can
differentiate between "no renew necessary" and "an error occurred".

Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
2021-04-04 19:12:38 -07:00
Leonardo Mörlein 4588a61652 uacme: allow including run-uacme
With this commit, the run-acme script can be included into other scripts
by setting INLCUDE_ONLY=1.

Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
2021-04-04 19:12:38 -07:00
Rosen Penev 8135fc31c7 uacme: update to 1.7
Switched to AUTORELEASE for simplicity.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-02-28 17:51:05 -08:00
Peter Stadler 36576c4c63 uacme: adopt to new behavior of nginx
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
2021-02-08 23:25:29 +01:00
Antti Seppälä 561a6959db uacme: Update to 1.6
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
2020-12-20 13:25:34 +02:00
Wren Turkal 953702ad30 uacme: remove cron entry on package removal
Previously, the cron config was not removed on uninstall. This change fixes
that.

Signed-off-by: Wren Turkal <wt@penguintechs.org>
2020-05-28 22:36:20 -07:00
Antti Seppälä cf6027f0b0 uacme: add support for user-provided setup and cleanup scripts
Add possibility for user to provide setup and cleanup scripts for
additional flexibility. Setup-script takes precedence over the built-in
behavior of uacme.

This helps users with more complex use-cases to utilize uacme to update
certificates without adding complexity to the provided run.sh script.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
2020-04-30 19:17:54 +03:00
Antti Seppälä 6d731cc388 uacme: update to 1.2.1
Update to latest release.

Do not compile optional ualpn binary.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
2020-04-18 21:29:23 +03:00
Rosen Penev 88378b18d3
uacme: update to 1.0.22
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-13 15:55:28 -08:00
Lucian Cristian cb81ac1e06 uacme: add package
lightweight client for the RFC8555 ACMEv2 protocol, written in plain C code
with minimal dependencies (libcurl and one of GnuTLS, OpenSSL or mbedTLS).

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2019-10-10 18:55:52 +03:00