settings.setAttribute("hbcicallback.askpassphrase.force",true);
HBCIUtils.setParam("client.passport.SIZRDHFile.filename",file.getAbsolutePath());
HBCIUtils.setParam("client.passport.SIZRDHFile.libname",getRDHLib());
HBCIUtils.setParam("client.passport.SIZRDHFile.init","0");
HBCIPassportInternal source = (HBCIPassportInternal) AbstractHBCIPassport.getInstance("SIZRDHFile");
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// Jetzt erzeugen wir einen im HBCI4Java-Format und kopieren die Daten
Logger.info("converting into hbci4java format");
HBCIUtils.setParam("client.passport.default","RDHNew");
HBCIUtils.setParam("client.passport.RDHNew.filename",newKey.getAbsolutePath());
HBCIUtils.setParam("client.passport.RDHNew.init","0");
HBCIPassportInternal target = (HBCIPassportInternal) AbstractHBCIPassport.getInstance("RDHNew");
target.setCountry(source.getCountry());
target.setBLZ(source.getBLZ());
target.setHost(source.getHost());
target.setPort(source.getPort());
target.setUserId(source.getUserId());
target.setCustomerId(source.getCustomerId());
target.setSysId(source.getSysId());
target.setSigId(source.getSigId());
target.setHBCIVersion(source.getHBCIVersion());
target.setBPD(source.getBPD());
target.setUPD(source.getUPD());
((HBCIPassportRDHNew)target).setInstSigKey(source.getInstSigKey());
((HBCIPassportRDHNew)target).setInstEncKey(source.getInstEncKey());
((HBCIPassportRDHNew)target).setMyPublicSigKey(source.getMyPublicSigKey());
((HBCIPassportRDHNew)target).setMyPrivateSigKey(source.getMyPrivateSigKey());
((HBCIPassportRDHNew)target).setMyPublicEncKey(source.getMyPublicEncKey());
((HBCIPassportRDHNew)target).setMyPrivateEncKey(source.getMyPrivateEncKey());
target.saveChanges();
target.close();
source.close();
////////////////////////////////////////////////////////////////////////
RDHKeyImpl key = new RDHKeyImpl(newKey);
key.setFormat(new HBCI4JavaFormat()); // wir tragen nicht uns selbst ein - da wir den ja ins HBCI4Java-Format konvertiert haben
return key;