{
getOutStream().println(HBCIUtilsInternal.getLocMsg("CALLB_PASS_IDENT",passport.getClientData("init")));
try {
INILetter iniletter;
LogFilter logfilter=LogFilter.getInstance();
Date date;
String st;
switch (reason) {
case NEED_PASSPHRASE_LOAD:
case NEED_PASSPHRASE_SAVE:
getOutStream().print(msg+": ");
getOutStream().flush();
st=getInStream().readLine();
if (reason==NEED_PASSPHRASE_SAVE) {
getOutStream().print(msg+" (again): ");
getOutStream().flush();
String st2=getInStream().readLine();
if (!st.equals(st2))
throw new InvalidUserDataException(HBCIUtilsInternal.getLocMsg("EXCMSG_PWDONTMATCH"));
}
logfilter.addSecretData(st,"X",LogFilter.FILTER_SECRETS);
retData.replace(0,retData.length(),st);
break;
case NEED_CHIPCARD:
getOutStream().println(msg);
break;
case NEED_HARDPIN:
getOutStream().println(msg);
break;
case NEED_SOFTPIN:
case NEED_PT_PIN:
case NEED_PT_TAN:
case NEED_PROXY_PASS:
getOutStream().print(msg+": ");
getOutStream().flush();
String secret=getInStream().readLine();
logfilter.addSecretData(secret,"X",LogFilter.FILTER_SECRETS);
retData.replace(0,retData.length(),secret);
break;
case HAVE_HARDPIN:
HBCIUtils.log("end of entering hardpin",HBCIUtils.LOG_DEBUG);
break;
case HAVE_CHIPCARD:
HBCIUtils.log("end of waiting for chipcard",HBCIUtils.LOG_DEBUG);
break;
case NEED_COUNTRY:
case NEED_BLZ:
case NEED_HOST:
case NEED_PORT:
case NEED_FILTER:
case NEED_USERID:
case NEED_CUSTOMERID:
case NEED_PROXY_USER:
getOutStream().print(msg+" ["+retData.toString()+"]: ");
getOutStream().flush();
st=getInStream().readLine();
if (st.length()==0)
st=retData.toString();
if (reason==NEED_BLZ) {
logfilter.addSecretData(st,"X",LogFilter.FILTER_MOST);
} else if (reason==NEED_USERID || reason==NEED_CUSTOMERID || reason==NEED_PROXY_USER) {
logfilter.addSecretData(st,"X",LogFilter.FILTER_IDS);
}
retData.replace(0,retData.length(),st);
break;
case NEED_NEW_INST_KEYS_ACK:
getOutStream().println(msg);
iniletter=new INILetter(passport,INILetter.TYPE_INST);
getOutStream().println(HBCIUtilsInternal.getLocMsg("EXPONENT")+": "+HBCIUtils.data2hex(iniletter.getKeyExponentDisplay()));
getOutStream().println(HBCIUtilsInternal.getLocMsg("MODULUS")+": "+HBCIUtils.data2hex(iniletter.getKeyModulusDisplay()));
getOutStream().println(HBCIUtilsInternal.getLocMsg("HASH")+": "+HBCIUtils.data2hex(iniletter.getKeyHashDisplay()));
getOutStream().print("<ENTER>=OK, \"ERR\"=ERROR: ");
getOutStream().flush();
retData.replace(0, retData.length(), getInStream().readLine());
break;
case HAVE_NEW_MY_KEYS:
iniletter=new INILetter(passport,INILetter.TYPE_USER);
date=new Date();
getOutStream().println(HBCIUtilsInternal.getLocMsg("DATE")+": "+HBCIUtils.date2StringLocal(date));
getOutStream().println(HBCIUtilsInternal.getLocMsg("TIME")+": "+HBCIUtils.time2StringLocal(date));
getOutStream().println(HBCIUtilsInternal.getLocMsg("BLZ")+": "+passport.getBLZ());
getOutStream().println(HBCIUtilsInternal.getLocMsg("USERID")+": "+passport.getUserId());
getOutStream().println(HBCIUtilsInternal.getLocMsg("KEYNUM")+": "+passport.getMyPublicSigKey().num);
getOutStream().println(HBCIUtilsInternal.getLocMsg("KEYVERSION")+": "+passport.getMyPublicSigKey().version);
getOutStream().println(HBCIUtilsInternal.getLocMsg("EXPONENT")+": "+HBCIUtils.data2hex(iniletter.getKeyExponentDisplay()));
getOutStream().println(HBCIUtilsInternal.getLocMsg("MODULUS")+": "+HBCIUtils.data2hex(iniletter.getKeyModulusDisplay()));
getOutStream().println(HBCIUtilsInternal.getLocMsg("HASH")+": "+HBCIUtils.data2hex(iniletter.getKeyHashDisplay()));
getOutStream().println(msg);
break;
case HAVE_INST_MSG:
getOutStream().println(msg);
getOutStream().println(HBCIUtilsInternal.getLocMsg("CONTINUE"));
getOutStream().flush();
getInStream().readLine();
break;
case NEED_REMOVE_CHIPCARD:
getOutStream().println(msg);
break;
case HAVE_CRC_ERROR:
getOutStream().println(msg);
int idx=retData.indexOf("|");
String blz=retData.substring(0,idx);
String number=retData.substring(idx+1);
getOutStream().print(HBCIUtilsInternal.getLocMsg("BLZ")+" ["+blz+"]: ");
getOutStream().flush();
String s=getInStream().readLine();
if (s.length()==0)
s=blz;
blz=s;
getOutStream().print(HBCIUtilsInternal.getLocMsg("ACCNUMBER")+" ["+number+"]: ");
getOutStream().flush();
s=getInStream().readLine();
if (s.length()==0)
s=number;
number=s;
logfilter.addSecretData(blz,"X",LogFilter.FILTER_MOST);
logfilter.addSecretData(number,"X",LogFilter.FILTER_IDS);
retData.replace(0,retData.length(),blz+"|"+number);
break;
case HAVE_IBAN_ERROR:
getOutStream().println(msg);
String iban=retData.toString();
getOutStream().print(HBCIUtilsInternal.getLocMsg("IBAN")+" ["+iban+"]: ");
getOutStream().flush();
String newiban=getInStream().readLine();
if (newiban.length()!=0 && !newiban.equals(iban)) {
retData.replace(0,retData.length(),newiban);
logfilter.addSecretData(newiban,"X",LogFilter.FILTER_IDS);
}
break;
case HAVE_ERROR:
getOutStream().println(msg);