From fc5c3e6db57123f8f42ebeae57075eb339b3d1d3 Mon Sep 17 00:00:00 2001 From: Frank Merkel <138444693+frankmer@users.noreply.github.com> Date: Fri, 15 Nov 2024 11:51:32 +0100 Subject: [PATCH] fix --- lib/api/impl/privacy_idea_container_api.dart | 4 ++-- lib/repo/secure_storage_mutexed.dart | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/api/impl/privacy_idea_container_api.dart b/lib/api/impl/privacy_idea_container_api.dart index 95048a9b..9a7181e2 100644 --- a/lib/api/impl/privacy_idea_container_api.dart +++ b/lib/api/impl/privacy_idea_container_api.dart @@ -135,8 +135,8 @@ class PiContainerApi implements TokenContainerApi { '|${container.timestamp.toIso8601String().replaceFirst('Z', '+00:00')}' '|${container.serial}' '|${container.registrationUrl}' - '|${InfoUtils.deviceBrand}' - '|${InfoUtils.deviceModel}' + '${(container.addDeviceInfos == true) ? '|${InfoUtils.deviceBrand}' : ''}' + '${(container.addDeviceInfos == true) ? '|${InfoUtils.deviceModel}' : ''}' '${passphrase != null ? '|$passphrase' : ''}'; final signature = eccUtils.signWithPrivateKey(ecPrivateClientKey, message); diff --git a/lib/repo/secure_storage_mutexed.dart b/lib/repo/secure_storage_mutexed.dart index fc53d8dd..d66b4b30 100644 --- a/lib/repo/secure_storage_mutexed.dart +++ b/lib/repo/secure_storage_mutexed.dart @@ -24,7 +24,9 @@ class SecureStorageMutexed { const SecureStorageMutexed(); static final Mutex _m = Mutex(); - static final FlutterSecureStorage storage = const FlutterSecureStorage(); + static final FlutterSecureStorage storage = const FlutterSecureStorage( + aOptions: AndroidOptions(encryptedSharedPreferences: true), + ); /// Function [f] is executed, protected by Mutex [_m]. /// That means, that calls of this method will always be executed serial.