Fix. Determine password id from derived values.
@@ -134,8 +134,7 @@ public class PACEStep implements ProtocolStep<DIDAuthenticate, DIDAuthenticateRe
EAC1OutputType eac1Output = eac1Input.getOutputType();
AuthenticatedAuxiliaryData aad = new AuthenticatedAuxiliaryData(eac1Input.getAuthenticatedAuxiliaryData());
- PasswordID pwId = PasswordID.PIN;
-
+ final PasswordID pwId = PasswordID.valueOf(didAuthenticate.getDIDName());
// Certificate chain
CardVerifiableCertificateChain certChain = new CardVerifiableCertificateChain(eac1Input.getCertificates());
@@ -177,7 +176,6 @@ public class PACEStep implements ProtocolStep<DIDAuthenticate, DIDAuthenticateRe
if (taCHAT.getSpecialFunctions().get(CHAT.SpecialFunction.CAN_ALLOWED)) {
requiredCHAT.setSpecialFunctions(CHAT.SpecialFunction.CAN_ALLOWED, true);
optionalCHAT.setSpecialFunctions(CHAT.SpecialFunction.CAN_ALLOWED, true);
- pwId = PasswordID.CAN;
}
// verify that required chat does not contain any prohibited values
@@ -186,7 +184,6 @@ public class PACEStep implements ProtocolStep<DIDAuthenticate, DIDAuthenticateRe
// remove overlapping values from optional chat
optionalCHAT.restrictAccessRights(taCHAT);
-
// Prepare data in DIDAuthenticate for GUI
byte pinID = pwId.getByte();
final EACData eacData = new EACData();
