Change PIN and Admin PIN after move to key operation

This commit is contained in:
Dominik Schürmann
2015-07-02 17:31:01 +02:00
parent 9fe05ed1e7
commit 195508ed92
13 changed files with 172 additions and 80 deletions

View File

@@ -1039,6 +1039,26 @@ public class PgpKeyOperation {
indent -= 1;
}
// 7. if requested, change PIN and/or Admin PIN on card
if (saveParcel.mCardPin != null) {
progress(R.string.progress_modify_pin, 90);
log.add(LogType.MSG_MF_PIN, indent);
indent += 1;
nfcKeyToCardOps.setPin(saveParcel.mCardPin);
indent -= 1;
}
if (saveParcel.mCardAdminPin != null) {
progress(R.string.progress_modify_admin_pin, 90);
log.add(LogType.MSG_MF_ADMIN_PIN, indent);
indent += 1;
nfcKeyToCardOps.setAdminPin(saveParcel.mCardAdminPin);
indent -= 1;
}
} catch (IOException e) {
Log.e(Constants.TAG, "encountered IOException while modifying key", e);
log.add(LogType.MSG_MF_ERROR_ENCODE, indent+1);