Skip to content

Commit

Permalink
chore!: update dtls2 package (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb authored Dec 11, 2024
1 parent 7d88bfd commit aaa4765
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions lib/coap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 2 additions & 1 deletion lib/src/coap_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -79,7 +80,7 @@ abstract class DefaultCoapConfig {
bool get dtlsWithTrustedRoots => true;

/// List of custom root certificates to use with OpenSSL.
List<Uint8List> get rootCertificates => const [];
List<Certificate> get rootCertificates => const [];

/// Can be used to specify the Ciphers that should be used by OpenSSL.
String? get dtlsCiphers => null;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/network/coap_network_openssl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CoapNetworkUDPOpenSSL extends CoapNetworkUDP {
super.bindAddress, {
required final bool verify,
required final bool withTrustedRoots,
required final List<Uint8List> rootCertificates,
required final List<Certificate> rootCertificates,
super.namespace,
final String? ciphers,
final internal.PskCredentialsCallback? pskCredentialsCallback,
Expand All @@ -78,7 +78,7 @@ class CoapNetworkUDPOpenSSL extends CoapNetworkUDP {

DtlsConnection? _dtlsConnection;

final List<Uint8List> _rootCertificates;
final List<Certificate> _rootCertificates;

final bool _verify;

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aaa4765

Please sign in to comment.