if(data.getHardToken() instanceof SwedishEIDHardToken){
SwedishEIDHardToken ht = (SwedishEIDHardToken) data.getHardToken();
if(includePUK){
retval.getPinDatas().add(new PinDataWS(HardTokenConstants.PINTYPE_SIGNATURE,ht.getInitialSignaturePIN(),ht.getSignaturePUK()));
retval.getPinDatas().add(new PinDataWS(HardTokenConstants.PINTYPE_BASIC,ht.getInitialAuthEncPIN(),ht.getAuthEncPUK()));
}
retval.setTokenType(HardTokenConstants.TOKENTYPE_SWEDISHEID);
return retval;
}
if(data.getHardToken() instanceof EnhancedEIDHardToken){
EnhancedEIDHardToken ht = (EnhancedEIDHardToken) data.getHardToken();
retval.setEncKeyKeyRecoverable(ht.getEncKeyRecoverable());
if(includePUK){
retval.getPinDatas().add(new PinDataWS(HardTokenConstants.PINTYPE_SIGNATURE,ht.getInitialSignaturePIN(),ht.getSignaturePUK()));
retval.getPinDatas().add(new PinDataWS(HardTokenConstants.PINTYPE_BASIC,ht.getInitialAuthPIN(),ht.getAuthPUK()));
}
retval.setTokenType(HardTokenConstants.TOKENTYPE_ENHANCEDEID);
return retval;
}
if(data.getHardToken() instanceof TurkishEIDHardToken){
TurkishEIDHardToken ht = (TurkishEIDHardToken) data.getHardToken();
if(includePUK){
retval.getPinDatas().add(new PinDataWS(HardTokenConstants.PINTYPE_BASIC,ht.getInitialPIN(),ht.getPUK()));
}
retval.setTokenType(HardTokenConstants.TOKENTYPE_TURKISHEID);
return retval;
}
throw new EjbcaException(ErrorCode.INTERNAL_ERROR,