fix(useragent): unsafe, but working implementation of ml-dsa
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'bootstrap_token.g.dart';
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'package:arbiter/features/connection/evm.dart' as evm;
|
||||
import 'package:arbiter/proto/evm.pb.dart';
|
||||
import 'package:arbiter/providers/connection/connection_manager.dart';
|
||||
import 'package:hooks_riverpod/experimental/mutation.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'evm.g.dart';
|
||||
@@ -35,7 +34,7 @@ final createEvmWallet = Mutation();
|
||||
|
||||
Future<void> executeCreateEvmWallet(MutationTarget target) async {
|
||||
return await createEvmWallet.run(target, (tsx) async {
|
||||
final connection = await tsx.get(connectionManagerProvider.future);
|
||||
final connection = await tsx.get(connectionManagerProvider.future);
|
||||
if (connection == null) {
|
||||
throw Exception('Not connected to the server.');
|
||||
}
|
||||
@@ -44,4 +43,4 @@ Future<void> executeCreateEvmWallet(MutationTarget target) async {
|
||||
|
||||
await tsx.get(evmProvider.notifier).refreshWallets();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import 'package:mtcore/markettakers.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:arbiter/features/identity/pk_manager.dart';
|
||||
import 'package:arbiter/features/identity/simple_ed25519.dart';
|
||||
import 'package:arbiter/features/identity/hazmat_mldsa.dart';
|
||||
|
||||
part 'key.g.dart';
|
||||
|
||||
@riverpod
|
||||
KeyManager keyManager(Ref ref) {
|
||||
return SimpleEd25519Manager();
|
||||
return HazmatMLDSAManager();
|
||||
}
|
||||
|
||||
@Riverpod(keepAlive: true)
|
||||
|
||||
@@ -18,9 +18,7 @@ Future<List<ua_sdk.Entry>?> sdkClients(Ref ref) async {
|
||||
);
|
||||
|
||||
if (!resp.hasSdkClient()) {
|
||||
throw Exception(
|
||||
'Expected SDK client response, got ${resp.whichPayload()}',
|
||||
);
|
||||
throw Exception('Expected SDK client response, got ${resp.whichPayload()}');
|
||||
}
|
||||
final sdkClientResponse = resp.sdkClient;
|
||||
if (!sdkClientResponse.hasList()) {
|
||||
|
||||
@@ -46,6 +46,8 @@ class ServerInfo extends _$ServerInfo {
|
||||
|
||||
Future<String> _fingerprint(List<int> caCert) async {
|
||||
final digest = await Sha256().hash(caCert);
|
||||
return digest.bytes.map((byte) => byte.toRadixString(16).padLeft(2, '0')).join();
|
||||
return digest.bytes
|
||||
.map((byte) => byte.toRadixString(16).padLeft(2, '0'))
|
||||
.join();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user