Build Android (FCM) / build-android-fcm (push) Canceled after 0s
Build Android / build-android (push) Canceled after 0s
Build iOS / build-ios (push) Canceled after 0s
Build Linux / build-linux (push) Canceled after 0s
Build macOS / build-macos (push) Canceled after 0s
Build Windows / build-windows (push) Canceled after 0s
Release (main) / android (oneme) (push) Canceled after 0s
Release (main) / android (qlyra) (push) Canceled after 0s
Release (main) / windows (push) Canceled after 0s
Release (main) / linux (push) Canceled after 0s
Release (main) / macos (push) Canceled after 0s
Release (main) / ios (push) Canceled after 0s
Release (main) / release (push) Canceled after 0s
40 lines
1.1 KiB
Dart
40 lines
1.1 KiB
Dart
import 'dart:typed_data';
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:kusoft/kusoft.dart';
|
|
|
|
void main() {
|
|
const libraryPath = String.fromEnvironment('KUSOFT_LIBRARY_PATH');
|
|
|
|
setUpAll(() async {
|
|
await initKusoft(libraryPath: libraryPath);
|
|
});
|
|
|
|
test('native auth fingerprint is deterministic and 96 bytes', () {
|
|
final first = authMode(
|
|
42,
|
|
'synthetic-device',
|
|
signature: Uint8List.fromList([1, 2, 3]),
|
|
dex: Uint8List.fromList([4, 5, 6]),
|
|
so: Uint8List.fromList([7, 8, 9]),
|
|
);
|
|
final second = authMode(
|
|
42,
|
|
'synthetic-device',
|
|
signature: Uint8List.fromList([1, 2, 3]),
|
|
dex: Uint8List.fromList([4, 5, 6]),
|
|
so: Uint8List.fromList([7, 8, 9]),
|
|
);
|
|
expect(first, hasLength(96));
|
|
expect(second, orderedEquals(first));
|
|
});
|
|
|
|
test('custom certificate authority remains opt in', () {
|
|
setTrustMincifryCa(enabled: false);
|
|
expect(trustMincifryCa(), isFalse);
|
|
setTrustMincifryCa(enabled: true);
|
|
expect(trustMincifryCa(), isTrue);
|
|
setTrustMincifryCa(enabled: false);
|
|
});
|
|
}
|