From 661aff1088fdc93f56d5971dadb834cabe965d40 Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 25 Jul 2022 15:57:35 +0200 Subject: [PATCH] Fix: Mifare Desfire: Incorrect KeySettings --- RFiDGear/DataAccessLayer/Remote/FromIO/RFiDDevice.cs | 4 +--- .../TaskSetupViewModels/MifareDesfireSetupViewModel.cs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/RFiDGear/DataAccessLayer/Remote/FromIO/RFiDDevice.cs b/RFiDGear/DataAccessLayer/Remote/FromIO/RFiDDevice.cs index 1c1593a..3c10510 100644 --- a/RFiDGear/DataAccessLayer/Remote/FromIO/RFiDDevice.cs +++ b/RFiDGear/DataAccessLayer/Remote/FromIO/RFiDDevice.cs @@ -1954,9 +1954,7 @@ public ERROR CreateMifareDesfireApplication(string _piccMasterKey, DESFireKeySet cmd.Authenticate(0, aiToUse.MasterCardKey); } - DESFireKeySettings ks = DESFireKeySettings.KS_CHANGE_KEY_WITH_MK | DESFireKeySettings.KS_FREE_LISTING_WITHOUT_MK | DESFireKeySettings.KS_FREE_CREATE_DELETE_WITHOUT_MK | DESFireKeySettings.KS_CONFIGURATION_CHANGEABLE; - - cmd.CreateApplicationEV1((uint)_appID, ks, (byte)_maxNbKeys, false, _keyTypeTargetApplication, 0, 0); + cmd.CreateApplicationEV1((uint)_appID, _keySettingsTarget, (byte)_maxNbKeys, false, _keyTypeTargetApplication, 0, 0); return ERROR.NoError; } diff --git a/RFiDGear/ViewModel/TaskSetupViewModels/MifareDesfireSetupViewModel.cs b/RFiDGear/ViewModel/TaskSetupViewModels/MifareDesfireSetupViewModel.cs index cd860f7..33fb869 100644 --- a/RFiDGear/ViewModel/TaskSetupViewModels/MifareDesfireSetupViewModel.cs +++ b/RFiDGear/ViewModel/TaskSetupViewModels/MifareDesfireSetupViewModel.cs @@ -1555,7 +1555,7 @@ public DESFireKeyType SelectedDesfireWriteKeyEncryptionType #region Commands /// - /// return new RelayCommand((_device) => OnNewCreateAppCommand(_device)); + /// /// public ICommand CreateAppCommand => new RelayCommand(OnNewCreateAppCommand); private void OnNewCreateAppCommand()