TlsSettings class
TLS settings for the client. Used to configure HTTPS connections.
Constructors
-
TlsSettings.new({bool trustRootCertificates = true, List<
String> trustedRootCertificates = const [], bool verifyCertificates = true, ClientCertificate? clientCertificate, TlsVersion? minTlsVersion, TlsVersion? maxTlsVersion, bool sni = true}) -
const
Properties
- clientCertificate → ClientCertificate?
-
The client certificate to use.
This is used for client authentication / mutual TLS.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxTlsVersion → TlsVersion?
-
The maximum TLS version to use.
final
- minTlsVersion → TlsVersion?
-
The minimum TLS version to use.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sni → bool
-
Enable TLS Server Name Indication (SNI).
final
-
trustedRootCertificates
→ List<
String> -
The trusted root certificates in PEM format.
Either specify the root certificate or the full
certificate chain.
The Rust API currently doesn't support trusting a single leaf certificate.
Hint: PEM format starts with
-----BEGIN CERTIFICATE-----
.final - trustRootCertificates → bool
-
Trust the root certificates that are pre-installed on the system.
final
- verifyCertificates → bool
-
Verify the server's certificate.
If set to
false
, the client will accept any certificate. This is insecure and should only be used for testing.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited