buchhaltung
buchhaltung copied to clipboard
Support for custom aqbanking settings (TLS prematurely terminated)
Hi @johannesgerer ,
I came across your project and like it very much, thank you.
One of my banks however gave me a bit of trouble when setting up buchhaltung and aqbanking: their server seems to prematurely terminate the TLS connection failing all aqbanking requests unless a specific flag (tlsIgnPrematureClose
) is set.
Initially I tried to manually set-up aqbanking but then buchhaltung complained about a missing .context
which seems to be created during buchhaltung setup
.
Currently my solution is to hardcode the setting of the flag for all accounts (and temporarily commenting out the other accounts for the setup):
diff --git a/src/Buchhaltung/AQBanking.hs b/src/Buchhaltung/AQBanking.hs
index 8b0841a..4999954 100644
--- a/src/Buchhaltung/AQBanking.hs
+++ b/src/Buchhaltung/AQBanking.hs
@@ -92,6 +92,7 @@ aqbankingSetup = do
, "-s", aqUrl conn
, "-N", aqName conn
, "--hbciversion=" <> toArg (aqHbciv conn)]
+ callAqhbci [ "adduserflags", "-b", aqBlz conn, "-f", "tlsIgnPrematureClose" ]
callAqhbci [ "getsysid" ]
callAqhbci [ "getaccounts" ]
callAqhbci [ "listaccounts" ]
If I could do more in Haskel then blindly copying lines of code I could image to add a userflags
parameter to the aqBanking/connections
section of the config.yml
Other than that maybe this issue can help others when they face issues with the HBCI setup part of buchhaltung to find a suitable workaround.