Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/at_lookup/lib/src/util/secure_socket_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import 'package:at_commons/at_commons.dart';
import 'package:at_utils/at_logger.dart' show AtSignLogger;

class SecureSocketUtil {
static AtSignLogger _logger = AtSignLogger('SecureSocketUtil');
static final AtSignLogger _logger = AtSignLogger('SecureSocketUtil');

///method that creates and returns a [SecureSocket]. If [decryptPackets] is set to true,the TLS keys are logged into a file.
static Future<SecureSocket> createSecureSocket(
String host, String port, SecureSocketConfig secureSocketConfig) async {
Expand Down Expand Up @@ -36,7 +37,8 @@ class SecureSocketUtil {
throw AtException(
'decryptPackets set to true but path to trusted certificated not provided');
}
SecureSocket aSecureSocket = await SecureSocket.connect(host, int.parse(port),
SecureSocket aSecureSocket = await SecureSocket.connect(
host, int.parse(port),
context: securityContext,
keyLog: (line) =>
keysFile?.writeAsStringSync(line, mode: FileMode.append));
Expand Down