DtlsClientContext constructor
DtlsClientContext({
- bool verify = true,
- bool withTrustedRoots = false,
- List<
Certificate> rootCertificates = const [], - String? ciphers,
- PskCredentialsCallback? pskCredentialsCallback,
- int? securityLevel,
verify enables certificate verification (recommended).
To allow the verification to succeed, system certificates have to be
imported using withTrustedRoots, or custom root certificates
in DER format need to be imported with rootCertificates.
System certificates are available only when OpenSSL is installed by
the system.
ciphers controls the cipher suites offered to the server.
Implementation
DtlsClientContext({
bool verify = true,
bool withTrustedRoots = false,
List<Certificate> rootCertificates = const [],
String? ciphers,
PskCredentialsCallback? pskCredentialsCallback,
this.securityLevel,
}) : _pskCredentialsCallback = pskCredentialsCallback,
_withTrustedRoots = withTrustedRoots,
_verify = verify,
_rootCertificates = rootCertificates,
_ciphers = ciphers;