Skip to content

Commit a24565c

Browse files
committed
Merge PR #140
2 parents 31b0402 + 82db805 commit a24565c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

piv/src/main/java/com/yubico/yubikit/piv/PivSession.java

+8
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,14 @@ public void reset() throws IOException, ApduException {
293293
protocol.sendAndReceive(new Apdu(0, INS_RESET, 0, 0, null));
294294
currentPinAttempts = 3;
295295
maxPinAttempts = 3;
296+
297+
// update management key type
298+
try {
299+
managementKeyType = getManagementKeyMetadata().getKeyType();
300+
} catch (UnsupportedOperationException unsupportedOperationException) {
301+
managementKeyType = ManagementKeyType.TDES;
302+
}
303+
296304
Logger.info(logger, "PIV application data reset performed");
297305
}
298306

0 commit comments

Comments
 (0)