Repository navigation
v3.0.0
Major release adding EBICS 3.0 (H005) and EBICS 2.4 (H003) support, alongside a
rewrite of request building into builders/factories/handlers.
Breaking changes
- [BREAKING] Default key size for
Epics::Client.setupraised from 2048 to 4096 bits - [BREAKING] Removed internal accessors that were never intended as public API:
Client#a,#e,#x,#bank_x,#bank_e,#keys=,#x_509_certificate,
#x_509_certificate_hash,#x_509_certificates_content,#header_request, and the
constantsEpics::Key,Epics::Signer,Epics::X509Certificate,
Epics::HeaderRequest,Epics::XMLSIG - [BREAKING]
Client#keysis now recomputed per call; mutating it no longer injects keys - [BREAKING] On H005,
Client#HAAandClient#order_typesreturn an array of service
hashes (service_name,scope,service_option,container,msg_name) instead of
an array of order-type strings - [BREAKING] Removed
Epics::Builders::MutableBuilder#add_receipt_code, which emitted
ReceiptCodeinsidemutablewhere the schema does not allow it.ReceiptCode
belongs toTransferReceipt, whichTransferReceiptBuilderalready builds - [BREAKING]
XEK,YCTandZSRraiseEpics::VersionSupportErroron H003/H004
instead ofNotImplementedError, matching every other version mismatch - [BREAKING]
order_id:is validated against the EBICSOrderIDTyperange (A000to
ZZZZ). Values belowA000rendered as e.g.0002, which violates the
[A-Z][A-Z0-9]{3}pattern; they now raiseArgumentError. The protocol form
(order_id: 'A000') is accepted alongside the integer - [BREAKING] Passing only one date-range bound (e.g.
client.STA(from)) silently
omitted the range and fetched the bank's full retention window. Both bounds are
mandatory withinDateRange, so this now raisesArgumentError - [BREAKING] Upload order data is now normalized once, on the way in, so the bytes
hashed for the electronic signature are the bytes transmitted. Until 3.0 the digest
was taken over the normalized document while the raw one was sent, which only
verifies against banks that normalize before checking the ES - [BREAKING] Removed
Epics::Services::CryptService#sign, which had no callers and
disagreed with#encrypton how an A005 signature is formed
Fixes
- [FIX] Loading a key file with the wrong passphrase raised
OpenSSL::PKey::PKeyError
about one time in 256, when the decrypted garbage happened to be padded correctly.
Decryption now verifies it produced a PEM, so a wrong passphrase always raises
OpenSSL::Cipher::CipherError - [FIX] An unreadable certificate in an HPB response raised a bare
OpenSSL::X509::CertificateError. It now raisesEpics::InvalidCertificateError
naming the HPB response as the source and keeping the OpenSSL message - [FIX]
Response#signature_valid?and#public_digest_valid?raisedNoMethodError
when the key they need was not loaded; they now raiseEpics::MissingKeyErrornaming
it.#digest_valid?no longer needs a key at all — it is a plain SHA-256 over the
authenticated nodes - [FIX] Removed the
container_flag:order parameter, which emitted aContainerFlag
element that exists in no EBICS schema. The container is expressed byContainer
with acontainerTypeattribute, whichcontainer_type:already emits - [ENHANCEMENT] Added the H005-only order types
XEK(account statements as PDF),
ZSR(payment status reports) andYCT(multi-currency credit transfer). Their BTF
mappings existed in the V3 factory but had no order class or client method - [ENHANCEMENT]
XEK,ZSR,Z01,Z52,Z53andZ54acceptscope:,
service_option:,msg_name_version:andcontainer_type:. Defaults are unchanged;
Swiss market practice requires aScopeand onlyZSRsent one, so a bank-specific
value can now be supplied without patching the gem - [ENHANCEMENT]
C54acceptsscope:,msg_name_version:andcontainer_type:, the
same options asC52andC53;C53gainedcontainer_type:. The three camt
retrievals now differ only in service name and message type - [FIX]
save_keysdiscarded any key-file entry it could not map to one of the five
keyring slots, so ahost_idthat no longer matched the stored prefix destroyed the
bank's public keys on save. Unrecognised entries are now carried through unchanged,
and a warning names each one instead of the failure being swallowed - [FIX]
XCTsent the wrong order type:CD1on H003/H004 and the DTAZV service on
H005, filing credit transfers as direct debits. It now sendsXCTon H003/H004.
EBICS 3.0 defines no counterpart for XCT, so on H005 it raises
Epics::VersionSupportErrorrather than guessing a BTF service - [FIX] The electronic signature over order data is again formed with line separators
removed, matching 2.x. The refactor had signed the raw document, changing the ES for
every upload - [FIX] H005
DataDigestcarried an RSA-PSS signature (256 bytes, non-reproducible)
instead of the SHA-256 hash of the order data - [FIX]
Response#business_error?treated every01-prefixed return code as
informational, reporting011001(negative acknowledgement) and011101(segment
number not reached) as success. It now uses an explicit allow-list - [FIX]
TimeandDateTimepassed as date-range bounds rendered anxs:dateTime
with a local offset into anxs:dateelement; they are now coerced to a date - [FIX]
C52requested no container on H005 whileClient#C52always unzips the
response, raisingZip::Error.C52andC53now default to a ZIP container and
both acceptcontainer_type:to override it - [FIX]
Epics::Client.setupforwarded its block to.new, which yields before the
keys are generated, so the block saw an empty keyring and anything touching it —
ini_letter,save_keys,INI,HIA— failed. It now yields once the client is
usable - [FIX]
Epics::VersionSupportErrorwas raised asraise Error, version, 'below',
where the third argument is the backtrace, so the direction was dropped and the
stack trace destroyed. 2.x-only order types on H005 now report "Support for versions
below 3.0" and keep their trace - [FIX] A download spanning several segments returned only its first segment, so zipped
downloads such asC52andC53raisedZip::Errorand plain ones such asSTAcame
back cut off without an error. The remaining segments are now requested in the transfer
phase and the order data is decrypted once all segments are joined. A segmented response
without a readableNumSegmentsraisesEpics::InvalidResponseError - [FIX] Truncated order data was inflated as far as it went and returned. It now raises
Epics::InvalidOrderDataError, with theZliborOpenSSLerror as itscause, and a
negative receipt is sent instead of a positive one, so the bank does not consider a
broken download as delivered - [FIX] H005 uploads were sent without
SignatureFlaginBTUOrderParams, although they
carry the user's ES (electronic signature), so banks treated them as orders
to be authorised outside EBICS and some rejected them withEBICS_INVALID_ORDER_TYPE.
SignatureFlagis now set by default, matchingOZHNNon H004. Passrequest_eds: true
to spool the order into the EDS (distributed electronic signature, German VEU)
when signatures are still missing, orsignature_flag: falseto omit the flag