feat: api2.oneme.ru с корнем Минцифры; kolibri с pub.dev вместо сабмодуля
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
import 'package:kolibri/kolibri.dart' show setTrustMincifryCa;
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../config/config.dart';
|
||||
|
||||
abstract class TlsConfig {
|
||||
static const String prefKey = 'dev_tls_insecure';
|
||||
|
||||
static Future<void> applyMincifryTrust() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
setTrustMincifryCa(
|
||||
enabled:
|
||||
prefs.getBool(ServerConfig.prefTrustMincifryKey) ??
|
||||
ServerConfig.defaultTrustMincifryCa,
|
||||
);
|
||||
}
|
||||
|
||||
static Future<bool> isInsecureAllowed() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
return prefs.getBool(prefKey) ?? false;
|
||||
|
||||
Reference in New Issue
Block a user