You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bank public key digest retrieved from the configuration file is wrong when calling fetchFile() from EbicsClient for C54 (actually Z54) order type. In order to fix it, I had to add a very nasty call to bank.setDigests() using KeyUtil.getKeyDigest() to fix the digest on the fly in the method:
public void fetchFile(File file, User user, Product product, OrderType orderType,
boolean isTest, Date start, Date end) throws IOException, EbicsException {
FileTransfer transferManager;
EbicsSession session = createSession(user, product);
// ### FIX THE WRONG BANK PUBLIC KEYS DIGEST ###
EbicsBank bank = session.getUser().getPartner().getBank();
bank.setDigests(KeyUtil.getKeyDigest(bank.getE002Key()), KeyUtil.getKeyDigest(bank.getX002Key()));
// #############################################
session.addSessionParam("FORMAT", "pain.xxx.cfonb160.dct");
if (isTest) {
session.addSessionParam("TEST", "true");
}
transferManager = new FileTransfer(session);
configuration.getTraceManager().setTraceDirectory(
configuration.getTransferTraceDirectory(user));
try {
transferManager.fetchFile(orderType, start, end, file);
} catch (NoDownloadDataAvailableException e) {
// don't log this exception as an error, caller can decide how to handle
throw e;
} catch (Exception e) {
configuration.getLogger().error(
Messages.getString("download.file.error", Constants.APPLICATION_BUNDLE_NAME), e);
throw e;
}
}
It would be great to have a better solution if possible?
Activity
uwemaurer commentedon Nov 19, 2025
Closing this issue as it’s old and the project has moved on (EBICS 3.0). Feel free to reopen if it’s still relevant.