shelf_letsencrypt 2.0.4
shelf_letsencrypt: ^2.0.4 copied to clipboard
Let's Encrypt support for the shelf package (free and automatic HTTPS certificate support).
2.0.4 #
-
Security: validate certificate domain names before building filesystem paths (GHSA-j4rv-3cg2-g9xc). A domain such as
../outsidecould previously read or write keys and certificates outside the certificates directory. -
Security: store private keys owner-only (GHSA-vpwj-w7xm-f2p4). On Linux, Android, macOS and iOS,
CertificatesHandlerIOcreates certificate directories as0700and keys as0600, and tightens existing ones. Keys that may already have been read by another user should be rotated.- Construction fails if the storage directory is owned by another user, if an
ancestor is writable by group or others (unless sticky, like
/tmp), or if a symbolic link in the path is owned by neither root nor the service user. - Loading a key fails if it is a symbolic link, has another owner or has extra hard links.
- The storage directory and configured PEM paths cannot contain
... directoryis now the absolute storage path with symbolic links resolved.- Generating a key pair throws
StateErrorif only one of the two key files exists, or if they do not match, instead of returning the account key pair. - Windows is unchanged: keys inherit the storage directory's ACLs.
- Linux requires
statx(glibc 2.28+, musl 1.2.5+ or Android API 30+). - ffi: ^2.1.2
- Construction fails if the storage directory is owned by another user, if an
ancestor is writable by group or others (unless sticky, like
-
Domain.isValidName:- Accepts any number of labels (e.g.
api.dev.example.com), with the DNS limits of 63 characters per label and 253 in total. - Rejects all-numeric top-level labels, so IP addresses such as
1.2.3.4are not valid domains. startServerno longer silently drops domains with 4 or more labels.
- Accepts any number of labels (e.g.
-
CertificatesHandlerIO:fileDomain*PEM,isHandledDomainCertificate,loadDomain*PEM,generateDomainPEMKeyPair,saveSignedCertificateChainandbuildSecurityContextsthrowArgumentErrorfor an invalid domain name (previouslybuildSecurityContextstreated it as unresolved).listAllHandledDomainsignores directories whose name is not a valid domain, and symlinked domain directories.listAllHandledDomainssupports PEM file names in subdirectories.
-
LetsEncrypt.requestCertificate: throwsArgumentErrorfor an invalid domain name before creating any account or domain keys. -
LetsEncrypt:startServer: no longer modifies the givendomainslist (it threwUnsupportedErrorfor an unmodifiable list with an invalid domain).startServer: closes the servers it started when it fails, instead of leaving the HTTP port bound.getURL: closes itsHttpClientand uses a 30s connection timeout.doACMEChallenge: throwsStateErrorwhen the order can't be created, and always removes the challenge token when it finishes.- The ACME account fallback now applies the account it finds or creates
(the order used to fail with a null-check error), uses a fresh nonce
instead of replaying a spent one (rejected with
badNonce), and also runs when the client initialization ends without an account. - Challenge tokens are matched case-insensitively, so a domain such as
WWW.Example.compasses the HTTP-01 challenge and self-test.
-
CertificatesHandler.buildSecurityContexts: fixed the documentation ofallowUnresolvedDomain, which described the opposite behaviour. -
Example: the renewal service restarts the current servers. It used to close the first servers again, failing on the next renewal. A failed restart is retried on the next check.
-
Tests:
- Integration tests of the full ACME flow (issuance, reuse, renewal, SNI with multiple domains and every failure path) against an in-process fake ACME server with real HTTP-01 validation and nonce checks.
- Line coverage from 61% to over 93%; CI runs on Linux and macOS and fails below 90%.
2.0.3 #
- multi_domain_secure_server: ^1.0.16
2.0.2 #
-
sdk: '>=3.5.0 <4.0.0'
-
multi_domain_secure_server: ^1.0.14
-
basic_utils: ^5.8.2
-
collection: ^1.19.0
-
dependency_validator: ^5.0.3
-
coverage: ^1.15.0
-
lints: ^5.1.1
-
test: ^1.28.0
2.0.1 #
- multi_domain_secure_server: ^1.0.12
2.0.0 #
-
LetsEncrypt:startServer: ignore invalid domains.startServer:- Added parameter
v6Only. - Use
MultiDomainSecureServerif multiple domains are being served:- Utilize
MultiDomainSecureServer.asHttpServer()to provide anHttpServerinstance forshelf.serveRequests. MultiDomainSecureServer:- Pass
requiresHandshakesWithHostname: true. - Ensure that
HttpServer.listenOnreceives requests from aSecureSocket.
- Pass
- Utilize
- Added parameter
-
Domain:- Added
isValidName.
- Added
-
multi_domain_secure_server: ^1.0.10
-
dependency_validator: ^4.1.2
-
coverage: ^1.11.1
-
lints: ^4.0.0
-
test: ^1.25.12
2.0.0-beta.1 #
-
BREAKING: Moved the port, securePort and bindingAddress from the startServer method to the LetsEncrypt constructor.
-
Added new version of startServer which takes a list of Domains rather than a map of domain/emails. This should make the API clearer.
-
Deprecated startSecureServer in favour of startServer. startSecureServer will be removed in
v2.1.0. -
Fixed a number of bugs where an alternate port was being ignored.
-
SecurityContextBuilder:- Changed
buildtobuildAll, returning aMap<String, SecurityContext>.
- Changed
-
LetsEncrypt.startServer:- Now receives a
Map<String, SecurityContext> securityContextsand an optionalSecurityContext? defaultSecurityContext.
- Now receives a
-
acme_client: ^1.3.0
-
basic_utils: ^5.7.0
-
path: ^1.9.1
-
shelf: ^1.4.2
-
dependency_validator: ^3.2.3
-
coverage: ^1.11.0
-
cron: ^0.5.1
-
lints: ^3.0.0
-
test: ^1.25.9
1.2.2 #
-
LetsEncrypt:- Added feild
minCertificateValidityTime.isDomainHttpsOKnow checks the certificate for short validity period, allowing to refresh the certificate before it really expires (5 days before as default).
- Field
log: improve logging parameters. - Improve logging messages.
- Added feild
-
Dart CI: update and optimize jobs.
-
test: ^1.24.6
1.2.1 #
- acme_client: ^1.2.0
- basic_utils: ^5.6.1
- collection: ^1.18.0
- lints: ^2.1.1
- test: ^1.24.4
1.2.0 #
LetsEncrypt:- Rename
isWellknownPathto `isWellKnownPath```
- Rename
- sdk: '>=3.0.0 <4.0.0'
- shelf: ^1.4.1
- collection: ^1.17.1
- lints: ^2.1.0
- test: ^1.24.1
1.1.1 #
- Self check URL now handled by
shelf_letsencrypt:- Using path:
/.well-known/check/
- Using path:
1.1.0 #
README.md: fix Dart CI badge- Update Dart CI.
- Fix lints.
- path: ^1.8.3
- shelf: ^1.4.0
- acme_client: ^1.1.0
- basic_utils: ^3.9.4
- coverage: ^1.6.3
- collection: ^1.16.0
- lints: ^2.0.1
- test: ^1.23.1
- dependency_validator: ^3.2.2
1.0.1 #
- Added support for multiple domains certificates in the same HTTPS server.
- collection: ^1.15.0
1.0.0 #
- Initial version.