dtls library

A DTLS = Datagram Transport Layer Security library implemented via FFI bindings to OpenSSL.

Classes

Certificate
Base class for certificates usable with OpenSSL.
DerCertificate
A certificate in DER format.
DtlsClient
Client for connecting to DTLS Servers and sending UDP packets with encrpyted payloads afterwards.
DtlsClientContext
The context contains settings for DTLS session establishment.
DtlsServer
Provides DTLS server functionality based on OpenSSL.
DtlsServerContext
The context contains settings for DTLS session establishment.
OpenSslBindings
Encapsulates the libssl/libcrypto bindings that higher level code consumes.
PemCertificate
A certificate in PEM format.
PskCredentials
Credentials used for PSK Cipher Suites consisting of an identity and a preSharedKey.

Enums

ConnectionState
Describes the different stages of a DtlsConnection's lifecycle.

Mixins

DtlsConnection
Represents a DTLS connection to a peer.

Functions

loadLibCrypto(DynamicLibrary? dynamicLibrary, {String? path}) → OpenSslFfi
Tries to load libcrypto from a dynamicLibrary.
loadLibSsl(DynamicLibrary? dynamicLibrary, {String? path}) → OpenSslFfi
Tries to load libssl from a dynamicLibrary.

Typedefs

PskCredentialsCallback = PskCredentials Function(String? identityHint)
Function signature for a callback function for retrieving/generating PskCredentials.
PskKeyStoreCallback = Iterable<int>? Function(List<int> identity)
Callback signature for retrieving Pre-Shared Keys from a DtlsServer's keystore.

Exceptions / Errors

OpenSslDtlsException
This Exception is thrown when a DTLS related error occurs.
OpenSslDtlsHandshakeException
A OpenSslDtlsException that is thrown when a DTLS handshake fails.
OpenSslDtlsTimeoutException
OpenSslDtlsException that indicates that a timeout has occured.
OpenSslException
Exception thrown when an OpenSSL error occurs.
OpenSslHandshakeException
Thrown when a TLS handshake fails.
OpenSslLoadException
OpenSslTlsException
This Exception is thrown when a TLS related error occurs.