Skip to content

Commit

Permalink
chore: use lower security level for DTLS example
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Dec 12, 2024
1 parent c69511b commit 90e11b4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions example/get_resource_secure.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ PskCredentials pskCredentialsCallback(final String? identityHint) =>
class DtlsConfig extends DefaultCoapConfig {
@override
String? get dtlsCiphers => 'PSK-AES128-CCM8';

@override
// Since TLS_PSK_WITH_AES_128_CCM_8 (also known as PSK-AES128-CCM8 in OpenSSL)
// is considered insecure in more recent versions of OpenSSL, we reduce the
// security level here, as TLS_PSK_WITH_AES_128_CCM_8 is the mandatory cipher
// suite that CoAP implementations must support when using DTLS in PSK mode
// (see section 9.1.3.1 of RFC 7252).
int? get openSslSecurityLevel => 0;
}

FutureOr<void> main() async {
Expand Down

0 comments on commit 90e11b4

Please sign in to comment.