diff --git a/lib/coap.dart b/lib/coap.dart index 45c5f36e..3de392ff 100644 --- a/lib/coap.dart +++ b/lib/coap.dart @@ -7,6 +7,9 @@ library coap; +export 'package:dtls2/dtls2.dart' + show Certificate, PemCertificate, DerCertificate; + /// Pre-defined configs export 'config/coap_config_all.dart'; export 'config/coap_config_default.dart'; diff --git a/lib/src/coap_config.dart b/lib/src/coap_config.dart index 4a010e80..518f8bc5 100644 --- a/lib/src/coap_config.dart +++ b/lib/src/coap_config.dart @@ -7,6 +7,7 @@ import 'dart:typed_data'; import 'dart:ffi'; +import 'package:dtls2/dtls2.dart'; import 'coap_constants.dart'; import 'deduplication/deduplicator_factory.dart'; @@ -79,7 +80,7 @@ abstract class DefaultCoapConfig { bool get dtlsWithTrustedRoots => true; /// List of custom root certificates to use with OpenSSL. - List get rootCertificates => const []; + List get rootCertificates => const []; /// Can be used to specify the Ciphers that should be used by OpenSSL. String? get dtlsCiphers => null; diff --git a/lib/src/network/coap_network_openssl.dart b/lib/src/network/coap_network_openssl.dart index d3edfe81..e76038bc 100644 --- a/lib/src/network/coap_network_openssl.dart +++ b/lib/src/network/coap_network_openssl.dart @@ -58,7 +58,7 @@ class CoapNetworkUDPOpenSSL extends CoapNetworkUDP { super.bindAddress, { required final bool verify, required final bool withTrustedRoots, - required final List rootCertificates, + required final List rootCertificates, super.namespace, final String? ciphers, final internal.PskCredentialsCallback? pskCredentialsCallback, @@ -78,7 +78,7 @@ class CoapNetworkUDPOpenSSL extends CoapNetworkUDP { DtlsConnection? _dtlsConnection; - final List _rootCertificates; + final List _rootCertificates; final bool _verify; diff --git a/pubspec.yaml b/pubspec.yaml index 5d50b440..f60d5b96 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: build: ^2.4.1 collection: ^1.18.0 convert: ^3.1.1 - dtls2: ^0.17.0 + dtls2: ^0.18.0 event_bus: ^2.0.0 meta: ^1.12.0 path: ^1.9.0