StaticTls class
A TlsProvider backed by a fixed certificate and key.
The certificate never changes at runtime (hotReloadable is false) and
there is no ACME challenge or renewal. Construct from PEM file paths with
StaticTls.files, from PEM strings with StaticTls.pem, or from an
already-built SecurityContext with StaticTls.context.
- Implemented types
Constructors
- StaticTls.context(SecurityContext context)
-
Wraps an already-configured SecurityContext.
factory
- StaticTls.files(String certificateChain, String privateKey, {String? password})
-
Builds a context from an X.509 certificate chain file
certificateChainand a private key fileprivateKey(optionally password-protected).factory - StaticTls.pem(String certificateChain, String privateKey, {String? password})
-
Builds a context from PEM-encoded
certificateChainandprivateKeystrings (optionally password-protected).factory
Properties
- challengeMiddleware → Middleware?
-
A middleware that answers ACME HTTP-01 challenges, mounted first in the
pipeline of the plaintext transport.
nullfor providers that need no challenge handling (e.g. StaticTls).no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
- hotReloadable → bool
-
Whether the securityContext may change at runtime (ACME renewal), in
which case the hub rebinds the HTTPS transport after maybeRenew reports
a refresh.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
maybeRenew(
) → Future< bool> -
Renews certificates if they are near expiry. Returns
trueif the securityContext changed and the listener should be rebound. A no-op (returningfalse) for static providers.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
provision(
) → Future< void> -
Ensures certificates exist, provisioning them if necessary. A no-op for
static providers.
override
-
securityContext(
) → SecurityContext -
The current SecurityContext to bind the listener with.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited