epics 2.11.0 → 3.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.semaphore/semaphore.yml +17 -8
  4. data/CHANGELOG.md +103 -0
  5. data/EBICS_REFERENCES.md +169 -0
  6. data/README.md +223 -50
  7. data/lib/epics/azv.rb +3 -10
  8. data/lib/epics/b2b.rb +3 -10
  9. data/lib/epics/bka.rb +3 -14
  10. data/lib/epics/builders/body_builder/base.rb +26 -0
  11. data/lib/epics/builders/body_builder/v2.rb +9 -0
  12. data/lib/epics/builders/body_builder/v3.rb +9 -0
  13. data/lib/epics/builders/body_builder.rb +6 -0
  14. data/lib/epics/builders/data_encryption_info_builder.rb +29 -0
  15. data/lib/epics/builders/data_transfer_builder/base.rb +52 -0
  16. data/lib/epics/builders/data_transfer_builder/v2.rb +9 -0
  17. data/lib/epics/builders/data_transfer_builder/v3.rb +12 -0
  18. data/lib/epics/builders/data_transfer_builder.rb +6 -0
  19. data/lib/epics/builders/header_builder/base.rb +26 -0
  20. data/lib/epics/builders/header_builder/v2.rb +9 -0
  21. data/lib/epics/builders/header_builder/v3.rb +9 -0
  22. data/lib/epics/builders/header_builder.rb +6 -0
  23. data/lib/epics/builders/mutable_builder.rb +28 -0
  24. data/lib/epics/builders/order_details_builder/base.rb +100 -0
  25. data/lib/epics/builders/order_details_builder/v2.rb +21 -0
  26. data/lib/epics/builders/order_details_builder/v3.rb +51 -0
  27. data/lib/epics/builders/order_details_builder.rb +10 -0
  28. data/lib/epics/builders/request_builder.rb +25 -0
  29. data/lib/epics/builders/static_builder/base.rb +75 -0
  30. data/lib/epics/builders/static_builder/v2.rb +9 -0
  31. data/lib/epics/builders/static_builder/v3.rb +9 -0
  32. data/lib/epics/builders/static_builder.rb +9 -0
  33. data/lib/epics/builders/transfer_receipt_builder.rb +19 -0
  34. data/lib/epics/builders/xml_builder/base.rb +92 -0
  35. data/lib/epics/builders/xml_builder/v24.rb +31 -0
  36. data/lib/epics/builders/xml_builder/v25.rb +31 -0
  37. data/lib/epics/builders/xml_builder/v3.rb +31 -0
  38. data/lib/epics/builders/xml_builder.rb +7 -0
  39. data/lib/epics/builders.rb +13 -0
  40. data/lib/epics/c2s.rb +3 -10
  41. data/lib/epics/c52.rb +2 -14
  42. data/lib/epics/c53.rb +2 -14
  43. data/lib/epics/c54.rb +2 -14
  44. data/lib/epics/c5n.rb +3 -14
  45. data/lib/epics/ccs.rb +3 -10
  46. data/lib/epics/cct.rb +3 -10
  47. data/lib/epics/cd1.rb +3 -10
  48. data/lib/epics/cdb.rb +3 -10
  49. data/lib/epics/cdd.rb +3 -10
  50. data/lib/epics/cds.rb +3 -10
  51. data/lib/epics/cdz.rb +3 -14
  52. data/lib/epics/cip.rb +3 -10
  53. data/lib/epics/client.rb +511 -125
  54. data/lib/epics/crypt/aes.rb +56 -0
  55. data/lib/epics/crypt/x_509.rb +52 -0
  56. data/lib/epics/crypt.rb +5 -0
  57. data/lib/epics/crz.rb +3 -14
  58. data/lib/epics/factories/crypt/aes_factory.rb +5 -0
  59. data/lib/epics/factories/crypt.rb +4 -0
  60. data/lib/epics/factories/request_factory/base.rb +236 -0
  61. data/lib/epics/factories/request_factory/v2.rb +194 -0
  62. data/lib/epics/factories/request_factory/v24.rb +32 -0
  63. data/lib/epics/factories/request_factory/v25.rb +31 -0
  64. data/lib/epics/factories/request_factory/v3.rb +305 -0
  65. data/lib/epics/factories/request_factory.rb +8 -0
  66. data/lib/epics/factories.rb +5 -0
  67. data/lib/epics/fdl.rb +3 -18
  68. data/lib/epics/ful.rb +3 -15
  69. data/lib/epics/generic_request.rb +36 -92
  70. data/lib/epics/generic_upload_request.rb +14 -67
  71. data/lib/epics/haa.rb +3 -9
  72. data/lib/epics/hac.rb +3 -14
  73. data/lib/epics/handlers/auth_signature_handler.rb +102 -0
  74. data/lib/epics/handlers/order_data_handler/base.rb +98 -0
  75. data/lib/epics/handlers/order_data_handler/v2.rb +39 -0
  76. data/lib/epics/handlers/order_data_handler/v24.rb +11 -0
  77. data/lib/epics/handlers/order_data_handler/v25.rb +11 -0
  78. data/lib/epics/handlers/order_data_handler/v3.rb +41 -0
  79. data/lib/epics/handlers/order_data_handler.rb +8 -0
  80. data/lib/epics/handlers/user_signature_handler/base.rb +10 -0
  81. data/lib/epics/handlers/user_signature_handler/v2.rb +17 -0
  82. data/lib/epics/handlers/user_signature_handler/v3.rb +17 -0
  83. data/lib/epics/handlers/user_signature_handler.rb +6 -0
  84. data/lib/epics/handlers.rb +6 -0
  85. data/lib/epics/hev.rb +2 -15
  86. data/lib/epics/hia.rb +4 -55
  87. data/lib/epics/hkd.rb +3 -9
  88. data/lib/epics/hpb.rb +3 -13
  89. data/lib/epics/hpd.rb +3 -9
  90. data/lib/epics/htd.rb +3 -9
  91. data/lib/epics/ini.rb +4 -46
  92. data/lib/epics/keyring.rb +17 -0
  93. data/lib/epics/letter_renderer.rb +17 -22
  94. data/lib/epics/ptk.rb +3 -14
  95. data/lib/epics/response.rb +51 -31
  96. data/lib/epics/services/crypt_service.rb +62 -0
  97. data/lib/epics/services/digest_resolver/base.rb +30 -0
  98. data/lib/epics/services/digest_resolver/v2.rb +13 -0
  99. data/lib/epics/services/digest_resolver/v3.rb +19 -0
  100. data/lib/epics/services/digest_resolver.rb +6 -0
  101. data/lib/epics/services.rb +5 -0
  102. data/lib/epics/signature.rb +50 -0
  103. data/lib/epics/{key.rb → signature_algorithm/base.rb} +14 -21
  104. data/lib/epics/signature_algorithm/rsa.rb +50 -0
  105. data/lib/epics/signature_algorithm/rsapkcs1.rb +16 -0
  106. data/lib/epics/signature_algorithm/rsapss.rb +20 -0
  107. data/lib/epics/signature_algorithm.rb +2 -0
  108. data/lib/epics/sta.rb +3 -14
  109. data/lib/epics/version.rb +3 -1
  110. data/lib/epics/vmk.rb +3 -14
  111. data/lib/epics/wss.rb +3 -9
  112. data/lib/epics/xct.rb +3 -10
  113. data/lib/epics/xds.rb +3 -10
  114. data/lib/epics/xe2.rb +3 -10
  115. data/lib/epics/xe3.rb +3 -10
  116. data/lib/epics/xek.rb +5 -0
  117. data/lib/epics/yct.rb +6 -0
  118. data/lib/epics/z01.rb +2 -14
  119. data/lib/epics/z52.rb +2 -14
  120. data/lib/epics/z53.rb +2 -14
  121. data/lib/epics/z54.rb +2 -14
  122. data/lib/epics/zsr.rb +5 -0
  123. data/lib/epics.rb +94 -5
  124. data/lib/letter/ini.erb +27 -6
  125. data/spec/aes_spec.rb +46 -0
  126. data/spec/auth_signature_handler_spec.rb +58 -0
  127. data/spec/builders_spec.rb +616 -0
  128. data/spec/certificate_handling_spec.rb +189 -0
  129. data/spec/client_setup_block_spec.rb +41 -0
  130. data/spec/client_spec.rb +143 -91
  131. data/spec/crypt_service_spec.rb +132 -0
  132. data/spec/date_range_spec.rb +46 -0
  133. data/spec/digest_resolver_spec.rb +164 -0
  134. data/spec/fixtures/bank_x509.pem +3 -0
  135. data/spec/fixtures/xml/haa.xml +40 -1
  136. data/spec/fixtures/xml/haa_receipt.xml +33 -30
  137. data/spec/fixtures/xml/haa_response_h004.xml +4 -0
  138. data/spec/fixtures/xml/haa_response_h005.xml +38 -0
  139. data/spec/fixtures/xml/hia_request_order_data.xml +24 -1
  140. data/spec/fixtures/xml/hpb_request.xml +1 -1
  141. data/spec/fixtures/xml/hpb_response_x509.xml +16 -0
  142. data/spec/fixtures/xml/htd_order_data_h005.xml +55 -0
  143. data/spec/fixtures/xml/jruby/hia.xml +20 -22
  144. data/spec/fixtures/xml/jruby/ini.xml +1 -3
  145. data/spec/fixtures/xml/ruby/hia.xml +21 -1
  146. data/spec/fixtures/xml/ruby/ini.xml +21 -1
  147. data/spec/handlers_spec.rb +267 -0
  148. data/spec/hpb_malformed_certificate_spec.rb +36 -0
  149. data/spec/key_file_decryption_spec.rb +27 -0
  150. data/spec/key_file_preservation_spec.rb +78 -0
  151. data/spec/keyring_spec.rb +349 -0
  152. data/spec/middleware/parse_ebics_spec.rb +2 -1
  153. data/spec/order_id_spec.rb +65 -0
  154. data/spec/orders/azv_spec.rb +63 -7
  155. data/spec/orders/b2b_spec.rb +68 -3
  156. data/spec/orders/bka_spec.rb +34 -4
  157. data/spec/orders/c2s_spec.rb +62 -9
  158. data/spec/orders/c52_spec.rb +34 -4
  159. data/spec/orders/c53_spec.rb +34 -4
  160. data/spec/orders/c54_spec.rb +36 -4
  161. data/spec/orders/c5n_spec.rb +36 -4
  162. data/spec/orders/camt_parity_spec.rb +80 -0
  163. data/spec/orders/ccs_spec.rb +62 -9
  164. data/spec/orders/cct_spec.rb +83 -9
  165. data/spec/orders/cd1_spec.rb +50 -7
  166. data/spec/orders/cdb_spec.rb +64 -7
  167. data/spec/orders/cdd_spec.rb +64 -7
  168. data/spec/orders/cds_spec.rb +74 -0
  169. data/spec/orders/cdz_spec.rb +67 -4
  170. data/spec/orders/cip_spec.rb +61 -9
  171. data/spec/orders/crz_spec.rb +67 -4
  172. data/spec/orders/fdl_spec.rb +143 -13
  173. data/spec/orders/ful_spec.rb +51 -10
  174. data/spec/orders/haa_spec.rb +115 -9
  175. data/spec/orders/hac_spec.rb +89 -10
  176. data/spec/orders/hev_spec.rb +1 -6
  177. data/spec/orders/hia_spec.rb +25 -22
  178. data/spec/orders/hkd_spec.rb +23 -4
  179. data/spec/orders/hpb_spec.rb +7 -4
  180. data/spec/orders/hpd_spec.rb +23 -4
  181. data/spec/orders/htd_spec.rb +23 -4
  182. data/spec/orders/ini_spec.rb +23 -18
  183. data/spec/orders/ptk_spec.rb +27 -4
  184. data/spec/orders/sta_spec.rb +129 -11
  185. data/spec/orders/vmk_spec.rb +36 -4
  186. data/spec/orders/wss_spec.rb +29 -3
  187. data/spec/orders/x_509_certificate_spec.rb +9 -1
  188. data/spec/orders/xct_spec.rb +63 -0
  189. data/spec/orders/xds_spec.rb +13 -6
  190. data/spec/orders/xe2_spec.rb +64 -7
  191. data/spec/orders/xe3_spec.rb +64 -7
  192. data/spec/orders/xek_spec.rb +31 -0
  193. data/spec/orders/yct_spec.rb +43 -0
  194. data/spec/orders/z01_spec.rb +34 -4
  195. data/spec/orders/z52_spec.rb +34 -4
  196. data/spec/orders/z53_spec.rb +34 -4
  197. data/spec/orders/z54_spec.rb +36 -4
  198. data/spec/orders/zsr_spec.rb +31 -0
  199. data/spec/request_factory_spec.rb +444 -0
  200. data/spec/response_business_error_spec.rb +45 -0
  201. data/spec/response_spec.rb +31 -0
  202. data/spec/response_validation_spec.rb +23 -0
  203. data/spec/segmented_download_spec.rb +248 -0
  204. data/spec/{key_spec.rb → signature_algorithm/rsa_pss_spec.rb} +4 -13
  205. data/spec/support/ebics_matcher.rb +17 -9
  206. data/spec/support/ebics_shared_examples.rb +642 -0
  207. data/spec/support/h005_client_helper.rb +23 -0
  208. data/spec/upload_digest_spec.rb +69 -0
  209. data/spec/user_signature_handler_spec.rb +25 -0
  210. data/spec/version_support_error_spec.rb +76 -0
  211. data/spec/xsd/{ebics_hev.xsd → H000/ebics_hev.xsd} +0 -0
  212. data/spec/xsd/H003/ebics.xsd +11 -0
  213. data/spec/xsd/H003/ebics_keymgmt_request.xsd +555 -0
  214. data/spec/xsd/H003/ebics_keymgmt_response.xsd +131 -0
  215. data/spec/xsd/H003/ebics_orders.xsd +1811 -0
  216. data/spec/xsd/H003/ebics_request.xsd +354 -0
  217. data/spec/xsd/H003/ebics_response.xsd +161 -0
  218. data/spec/xsd/{ebics_signature.xsd → H003/ebics_signature.xsd} +0 -0
  219. data/spec/xsd/H003/ebics_types.xsd +2361 -0
  220. data/spec/xsd/H003/xmldsig-core-schema.xsd +318 -0
  221. data/spec/xsd/H004/ebics_signature.xsd +217 -0
  222. data/spec/xsd/H005/ebics_H005.xsd +11 -0
  223. data/spec/xsd/H005/ebics_keymgmt_request_H005.xsd +523 -0
  224. data/spec/xsd/H005/ebics_keymgmt_response_H005.xsd +137 -0
  225. data/spec/xsd/H005/ebics_orders_H005.xsd +2094 -0
  226. data/spec/xsd/H005/ebics_request_H005.xsd +349 -0
  227. data/spec/xsd/H005/ebics_response_H005.xsd +167 -0
  228. data/spec/xsd/H005/ebics_signature_S002.xsd +177 -0
  229. data/spec/xsd/H005/ebics_types_H005.xsd +1885 -0
  230. data/spec/xsd/H005/xmldsig-core-schema.xsd +318 -0
  231. metadata +199 -36
  232. data/lib/epics/header_request.rb +0 -58
  233. data/lib/epics/middleware/xmlsig.rb +0 -16
  234. data/lib/epics/signer.rb +0 -40
  235. data/lib/epics/x_509_certificate.rb +0 -15
  236. data/lib/letter/ini_with_certs.erb +0 -335
  237. data/spec/generic_upload_spec.rb +0 -58
  238. data/spec/hpb_spec.rb +0 -15
  239. data/spec/signer_spec.rb +0 -34
  240. /data/spec/xsd/{ebics_H004.xsd → H004/ebics_H004.xsd} +0 -0
  241. /data/spec/xsd/{ebics_keymgmt_request_H004.xsd → H004/ebics_keymgmt_request_H004.xsd} +0 -0
  242. /data/spec/xsd/{ebics_keymgmt_response_H004.xsd → H004/ebics_keymgmt_response_H004.xsd} +0 -0
  243. /data/spec/xsd/{ebics_orders_H004.xsd → H004/ebics_orders_H004.xsd} +0 -0
  244. /data/spec/xsd/{ebics_request_H004.xsd → H004/ebics_request_H004.xsd} +0 -0
  245. /data/spec/xsd/{ebics_response_H004.xsd → H004/ebics_response_H004.xsd} +0 -0
  246. /data/spec/xsd/{ebics_types_H004.xsd → H004/ebics_types_H004.xsd} +0 -0
  247. /data/spec/xsd/{xmldsig-core-schema.xsd → H004/xmldsig-core-schema.xsd} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a9354e4e83108afe41607057bd8ce1fcba27fc03476a521269911f1f1fea57f
4
- data.tar.gz: 82333eed938cdb0a31fcb54b206a6c5653eef950ee7b120f9487de012e4b22f0
3
+ metadata.gz: 2d81d3bda7eef2d4468cba9327d5e72ad7222eec73e76bfe82c609765a212075
4
+ data.tar.gz: b49bcb37a43532a0f9d5074478e22cfa126c4b3e7bf594894f8be27e60aeca37
5
5
  SHA512:
6
- metadata.gz: 9d74d5100f8698e179df3d9b7eb3f3b3154d64313b975e6645b99ebdfd389e6b1695021640f39b753c685d47055216bf2ecda404c01b1c32f049f16b4caae769
7
- data.tar.gz: 3d79c5800b76e7dfbe259e27e8ae1d1f14a77dc99a5b676603bd184a3cff5d3780682f13b14c796a0f92182805cec119ddf4dd585977b4b81f2c0195df00cd2d
6
+ metadata.gz: '09ce2c4c8afa08bf91a00112d8a1078b388a76b40276006706f0c821a1aab7924655a9de56032956d1e74975dda1be8438e42d11211fae95b2d4aa4634b7f7f5'
7
+ data.tar.gz: fe3a33f8d19057cbe437189ae98b18e32eafbedde991bb12b1cf0c10a63384a5910f254272f4d9d43f972951d50fa18601bd2b521253603b2f3893e6a81c9e13
data/.gitignore CHANGED
@@ -17,4 +17,5 @@ mkmf.log
17
17
  sbk.key
18
18
  /mt940
19
19
  *.key
20
- .idea/
20
+ .idea/
21
+ vendor
@@ -3,7 +3,7 @@ name: Test
3
3
  agent:
4
4
  machine:
5
5
  type: e1-standard-2
6
- os_image: ubuntu2004
6
+ os_image: ubuntu2204
7
7
  blocks:
8
8
  - name: Setup
9
9
  task:
@@ -16,30 +16,39 @@ blocks:
16
16
  - name: Spec versions
17
17
  task:
18
18
  jobs:
19
- - name: "3.1"
19
+ - name: "3.2"
20
20
  commands:
21
21
  - checkout
22
- - sem-version ruby 3.1
22
+ - sem-version ruby 3.2
23
23
  - cache restore
24
24
  - gem install bundler:2.5.19
25
25
  - bundle install
26
26
  - cache store
27
27
  - bundle exec rspec
28
- - name: "3.2"
28
+ - name: "3.3"
29
29
  commands:
30
30
  - checkout
31
- - sem-version ruby 3.2
31
+ - sem-version ruby 3.3
32
32
  - cache restore
33
33
  - gem install bundler:2.5.19
34
34
  - bundle install
35
35
  - cache store
36
36
  - bundle exec rspec
37
- - name: "3.3"
37
+ - name: "3.4"
38
38
  commands:
39
39
  - checkout
40
- - sem-version ruby 3.3
40
+ - sem-version ruby 3.4
41
41
  - cache restore
42
- - gem install bundler:2.5.19
42
+ - gem install bundler:2.6.9
43
+ - bundle install
44
+ - cache store
45
+ - bundle exec rspec
46
+ - name: "4.0"
47
+ commands:
48
+ - checkout
49
+ - sem-version ruby 4.0
50
+ - cache restore
51
+ - gem install bundler:4.0.3
43
52
  - bundle install
44
53
  - cache store
45
54
  - bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -1,5 +1,108 @@
1
1
  ### Unreleased
2
2
 
3
+ - [FIX] A download spanning several segments returned only its first segment, so zipped
4
+ downloads such as `C52` and `C53` raised `Zip::Error` and plain ones such as `STA` came
5
+ back cut off without an error. The remaining segments are now requested in the transfer
6
+ phase and the order data is decrypted once all segments are joined. A segmented response
7
+ without a readable `NumSegments` raises `Epics::InvalidResponseError`
8
+ - [FIX] Truncated order data was inflated as far as it went and returned. It now raises
9
+ `Epics::InvalidOrderDataError`, with the `Zlib` or `OpenSSL` error as its `cause`, and a
10
+ negative receipt is sent instead of a positive one, so the bank does not consider a
11
+ broken download as delivered
12
+
13
+ ### 3.0.0.rc1
14
+
15
+ Major release adding EBICS 3.0 (H005) and EBICS 2.4 (H003) support, alongside a
16
+ rewrite of request building into builders/factories/handlers.
17
+
18
+ **Breaking changes**
19
+
20
+ - [BREAKING] Default key size for `Epics::Client.setup` raised from 2048 to 4096 bits
21
+ - [BREAKING] Removed internal accessors that were never intended as public API:
22
+ `Client#a`, `#e`, `#x`, `#bank_x`, `#bank_e`, `#keys=`, `#x_509_certificate`,
23
+ `#x_509_certificate_hash`, `#x_509_certificates_content`, `#header_request`, and the
24
+ constants `Epics::Key`, `Epics::Signer`, `Epics::X509Certificate`,
25
+ `Epics::HeaderRequest`, `Epics::XMLSIG`
26
+ - [BREAKING] `Client#keys` is now recomputed per call; mutating it no longer injects keys
27
+ - [BREAKING] On H005, `Client#HAA` and `Client#order_types` return an array of service
28
+ hashes (`service_name`, `scope`, `service_option`, `container`, `msg_name`) instead of
29
+ an array of order-type strings
30
+
31
+ **Fixes**
32
+
33
+ - [FIX] Loading a key file with the wrong passphrase raised `OpenSSL::PKey::PKeyError`
34
+ about one time in 256, when the decrypted garbage happened to be padded correctly.
35
+ Decryption now verifies it produced a PEM, so a wrong passphrase always raises
36
+ `OpenSSL::Cipher::CipherError`
37
+ - [FIX] An unreadable certificate in an HPB response raised a bare
38
+ `OpenSSL::X509::CertificateError`. It now raises `Epics::InvalidCertificateError`
39
+ naming the HPB response as the source and keeping the OpenSSL message
40
+ - [FIX] `Response#signature_valid?` and `#public_digest_valid?` raised `NoMethodError`
41
+ when the key they need was not loaded; they now raise `Epics::MissingKeyError` naming
42
+ it. `#digest_valid?` no longer needs a key at all — it is a plain SHA-256 over the
43
+ authenticated nodes
44
+ - [BREAKING] Removed `Epics::Builders::MutableBuilder#add_receipt_code`, which emitted
45
+ `ReceiptCode` inside `mutable` where the schema does not allow it. `ReceiptCode`
46
+ belongs to `TransferReceipt`, which `TransferReceiptBuilder` already builds
47
+ - [FIX] Removed the `container_flag:` order parameter, which emitted a `ContainerFlag`
48
+ element that exists in no EBICS schema. The container is expressed by `Container`
49
+ with a `containerType` attribute, which `container_type:` already emits
50
+ - [ENHANCEMENT] Added the H005-only order types `XEK` (account statements as PDF),
51
+ `ZSR` (payment status reports) and `YCT` (multi-currency credit transfer). Their BTF
52
+ mappings existed in the V3 factory but had no order class or client method
53
+ - [BREAKING] `XEK`, `YCT` and `ZSR` raise `Epics::VersionSupportError` on H003/H004
54
+ instead of `NotImplementedError`, matching every other version mismatch
55
+ - [ENHANCEMENT] `XEK`, `ZSR`, `Z01`, `Z52`, `Z53` and `Z54` accept `scope:`,
56
+ `service_option:`, `msg_name_version:` and `container_type:`. Defaults are unchanged;
57
+ Swiss market practice requires a `Scope` and only `ZSR` sent one, so a bank-specific
58
+ value can now be supplied without patching the gem
59
+ - [ENHANCEMENT] `C54` accepts `scope:`, `msg_name_version:` and `container_type:`, the
60
+ same options as `C52` and `C53`; `C53` gained `container_type:`. The three camt
61
+ retrievals now differ only in service name and message type
62
+ - [FIX] `save_keys` discarded any key-file entry it could not map to one of the five
63
+ keyring slots, so a `host_id` that no longer matched the stored prefix destroyed the
64
+ bank's public keys on save. Unrecognised entries are now carried through unchanged,
65
+ and a warning names each one instead of the failure being swallowed
66
+ - [BREAKING] `order_id:` is validated against the EBICS `OrderIDType` range (`A000` to
67
+ `ZZZZ`). Values below `A000` rendered as e.g. `0002`, which violates the
68
+ `[A-Z][A-Z0-9]{3}` pattern; they now raise `ArgumentError`. The protocol form
69
+ (`order_id: 'A000'`) is accepted alongside the integer
70
+
71
+ - [FIX] `XCT` sent the wrong order type: `CD1` on H003/H004 and the DTAZV service on
72
+ H005, filing credit transfers as direct debits. It now sends `XCT` on H003/H004.
73
+ EBICS 3.0 defines no counterpart for XCT, so on H005 it raises
74
+ `Epics::VersionSupportError` rather than guessing a BTF service
75
+ - [FIX] The electronic signature over order data is again formed with line separators
76
+ removed, matching 2.x. The refactor had signed the raw document, changing the ES for
77
+ every upload
78
+ - [BREAKING] Upload order data is now normalized once, on the way in, so the bytes
79
+ hashed for the electronic signature are the bytes transmitted. Until 3.0 the digest
80
+ was taken over the normalized document while the raw one was sent, which only
81
+ verifies against banks that normalize before checking the ES
82
+ - [FIX] H005 `DataDigest` carried an RSA-PSS signature (256 bytes, non-reproducible)
83
+ instead of the SHA-256 hash of the order data
84
+ - [FIX] `Response#business_error?` treated every `01`-prefixed return code as
85
+ informational, reporting `011001` (negative acknowledgement) and `011101` (segment
86
+ number not reached) as success. It now uses an explicit allow-list
87
+ - [BREAKING] Passing only one date-range bound (e.g. `client.STA(from)`) silently
88
+ omitted the range and fetched the bank's full retention window. Both bounds are
89
+ mandatory within `DateRange`, so this now raises `ArgumentError`
90
+ - [FIX] `Time` and `DateTime` passed as date-range bounds rendered an `xs:dateTime`
91
+ with a local offset into an `xs:date` element; they are now coerced to a date
92
+ - [FIX] `C52` requested no container on H005 while `Client#C52` always unzips the
93
+ response, raising `Zip::Error`. `C52` and `C53` now default to a ZIP container and
94
+ both accept `container_type:` to override it
95
+ - [BREAKING] Removed `Epics::Services::CryptService#sign`, which had no callers and
96
+ disagreed with `#encrypt` on how an A005 signature is formed
97
+ - [FIX] `Epics::Client.setup` forwarded its block to `.new`, which yields before the
98
+ keys are generated, so the block saw an empty keyring and anything touching it —
99
+ `ini_letter`, `save_keys`, `INI`, `HIA` — failed. It now yields once the client is
100
+ usable
101
+ - [FIX] `Epics::VersionSupportError` was raised as `raise Error, version, 'below'`,
102
+ where the third argument is the backtrace, so the direction was dropped and the
103
+ stack trace destroyed. 2.x-only order types on H005 now report "Support for versions
104
+ below 3.0" and keep their trace
105
+
3
106
  ### 2.11.0
4
107
 
5
108
  - [ENHANCEMENT] Added FUL order type (thanks to @scollon-pl)
@@ -0,0 +1,169 @@
1
+ # EBICS Documentation — Complete Reference
2
+
3
+ > Last updated: 2026-03-05
4
+
5
+ ---
6
+
7
+ ## 1. Official Specifications (ebics.org)
8
+
9
+ | Document | Link | Version | Language |
10
+ |---|---|---|---|
11
+ | **Specification main page** | https://www.ebics.org/en/technical-information/ebics-specification | V3.0.2 (current) | EN/DE/FR |
12
+ | **XSD Schemas** | https://www.ebics.org/en/technical-information/ebics-schema | H003/H004/H005 | — |
13
+ | **Implementation Guide** | https://www.ebics.org/en/technical-information/implementation-guide | All | EN/DE |
14
+ | **BTF Mapping (BTD/BTU)** | https://www.ebics.org/en/technical-information/btf-mapping | H005 | EN/DE |
15
+ | **Examples** | https://www.ebics.org/en/technical-information/examples | All | EN |
16
+ | **Additional Standards** | https://www.ebics.org/en/technical-information/additional-standards | All | EN/DE |
17
+ | **Change Requests (archive)** | https://www.ebics.org/en/technical-information/archive-ebics/change-requests | Historical | EN/DE |
18
+ | **Passed CRs** | https://www.ebics.org/en/technical-information/maintain-advance/passed-crs | Maintenance | EN/DE |
19
+ | **Technical News** | https://www.ebics.org/en/current-topics/technical-news | — | EN/DE |
20
+ | **Archived Specifications** | https://www.ebics.org/en/technical-information/archive-ebics/specification | V2.4/2.5 | EN/DE |
21
+
22
+ ---
23
+
24
+ ## 2. Specification PDFs — Direct Download
25
+
26
+ ### Main Specification
27
+
28
+ | Document | Link | Version |
29
+ |---|---|---|
30
+ | **EBICS V3.0 Spec (SIX)** | https://www.six-group.com/dam/download/banking-services/interbank-clearing/en/standardization/ebics/ebics_3_0.pdf | H005 / V3.0 |
31
+ | **EBICS V3.0 Spec (Gitea mirror)** | https://gitea.szsolutions.ch/Mirror/odoo_account_ebics/raw/branch/15.0/account_ebics/doc/2017-03-29-EBICS_V_3.0-FinalVersion.pdf | H005 / V3.0 |
32
+ | **EBICS V2.5 Spec (CFONB)** | https://www.cfonb.org/fichiers/20130612170023_6_4_EBICS_Specification_2.5_final_2011_05_16_2012_07_01.pdf | H004 / V2.5 |
33
+ | **EBICS V2.4.2 Spec (CFONB)** | https://www.cfonb.org/fichiers/20130612170103_6_7_EBICS_Specification_2.4.2_final_2010_02_16.pdf | H003 / V2.4 |
34
+
35
+ ### Annexes & Supplements
36
+
37
+ | Document | Link | Content |
38
+ |---|---|---|
39
+ | **Annex 1 — Return Codes** | https://www.cfonb.org/fichiers/20130612170037_6_5_EBICS_Annex1_ReturnCodes_final_16_05_2011_2012_07_01.pdf | All EBICS return codes |
40
+ | **Annex 2 — Order Type Identifiers** | https://www.cfonb.org/fichiers/20140423153546_Annex_2_%E2%80%93_EBICS_Specification_april_2014.pdf | Order type identifiers |
41
+ | **EBICS SC 2021** | https://www.cfonb.org/fichiers/20210420081014_EBICS_SC_2021.pdf | EBICS SC overview |
42
+
43
+ ### France Implementation Guides (CFONB)
44
+
45
+ | Document | Link | Content |
46
+ |---|---|---|
47
+ | **IG CFONB V2.1.5 (FR)** | https://www.cfonb.org/fichiers/20141029101016_6_10_EBICS_IG_CFONB_VF_2_1_5_2014_06_23.pdf | France implementation guide |
48
+ | **IG CFONB V2.1.4 (EN)** | https://www.cfonb.org/fichiers/20130612170302_6_16_EBICS_IG_CFONB_V2_1.4_english_version_2012_02_24.pdf | France implementation guide (English) |
49
+ | **IG Annex 2 — File names** | https://www.cfonb.org/fichiers/20130612170321_6_17_EBICS_IG_V1.2._Annexe_2_File_names_VE_final_2010_01.pdf | File naming conventions |
50
+ | **IG Annex A3.1 — Certificate error codes** | https://www.cfonb.org/fichiers/20130612170148_6_11_EBICS_IG_V1_1_Annexe_A3_1_Certificates_error_codes_2009_04.pdf | X.509 certificate error codes |
51
+ | **EBICS test scenarios** | https://www.cfonb.org/fichiers/20130612170423_6_21_Proposition_tests_EBICS_V1_0_2009_05_15.pdf | Test scenarios |
52
+
53
+ ### BTF / BTD / BTU (EBICS 3.0)
54
+
55
+ | Document | Link | Content |
56
+ |---|---|---|
57
+ | **File Format → BTF mapping (CFONB)** | https://www.cfonb.org/sites/www.cfonb.org/files/documents/Tables%20de%20correspondance%20File%20Format%20vers%20BTF-Business%20Transaction%20Format%20(EBICS%20v3.0%20et%20suivantes)%20.pdf | Order type → BTF mapping |
58
+ | **BTF Parameters (konfipay wiki)** | https://wiki.konfipay.de/konfipay/btf-parameters-ebics-3-0 | BTF parameter reference |
59
+ | **CPG — EBICS BTU, BTD and BTF** | https://www.cpg.de/en/ebics-btu-btd-and-btf/ | BTD/BTU/BTF explained |
60
+ | **CPG — EBICS 3.0 innovations** | https://www.cpg.de/en/ebics-3-0/ | EBICS 3.0 overview |
61
+
62
+ ---
63
+
64
+ ## 3. Switzerland — SIX Group
65
+
66
+ | Document | Link | Content |
67
+ |---|---|---|
68
+ | **Swiss Market Practice Guidelines EBICS 3.0 v1.3** | https://www.six-group.com/dam/download/banking-services/standardization/ebics/market-practice-guidelines-ebics3.0-v1.3-en.pdf | Swiss guidelines H005 |
69
+ | **Swiss Market Practice Guidelines EBICS 3.0 v1.2** | https://www.six-group.com/dam/download/banking-services/standardization/ebics/market-practice-guidelines-ebics3.0-v1.2-en.pdf | Swiss guidelines H005 (older) |
70
+ | **EBICS in Switzerland (overview)** | https://www.six-group.com/dam/download/banking-services/interbank-clearing/en/standardization/ebics/ebics.pdf | EBICS Switzerland overview |
71
+ | **SIX EBICS page** | https://www.six-group.com/en/products-services/banking-services/payment-standardization/standards/ebics.html | SIX EBICS portal |
72
+
73
+ ---
74
+
75
+ ## 4. Germany — Deutsche Kreditwirtschaft / Bundesbank
76
+
77
+ | Document | Link | Content |
78
+ |---|---|---|
79
+ | **DFÜ-Abkommen — Anlage 3 Datenformate V3.8** | http://www.bayernlb.de/internet/media/de/ir/downloads_1/zahlungsverkehr/richtlinien/2024-11-17_Anlage_3_Datenformate_V3.8.pdf | Data format specification |
80
+ | **ebics.de — Datenformate** | https://www.ebics.de/de/datenformate | Data formats portal |
81
+ | **DFÜ-Verfahren EBICS — DK** | https://die-dk.de/zahlungsverkehr/electronic-banking/dfu-verfahren-ebics/ | DK EBICS page |
82
+ | **Verfahrensregeln EBICS 2025 (Bundesbank)** | https://www.bundesbank.de/resource/blob/964236/6f3129a9aab710eae9b2939e0021a7bc/472B63F073F071307366337C94F8C870/verfahrensregeln-ebics-2025-data.pdf | Procedural rules 2025 |
83
+ | **Verfahrensregeln EBICS V3.9 (Bundesbank)** | https://www.bundesbank.de/resource/blob/764544/2bfc83ca09df0c7a4a53c96caec1ac55/mL/verfahrensregeln-ebics-3-9-data.pdf | Procedural rules V3.9 |
84
+ | **Besondere Bedingungen EBICS 2024 (Bundesbank)** | https://www.bundesbank.de/resource/blob/925930/8b5c5b9da853666a3b1638b0005aa3e4/mL/besondere-bedingungen-ebics-2024-data.pdf | Special conditions |
85
+ | **Deutsche Bank — Order Types (EN)** | https://www.deutsche-bank.de/dam/deutschebank/de/shared/pdf/ebics-dfu-explanation-of-order-type-identifiers-e.pdf | Order type reference (EN) |
86
+ | **Deutsche Bank — Auftragsarten (DE)** | https://www.deutsche-bank.de/dam/deutschebank/de/shared/pdf/ub/ebics-dfue-erlaeuterungen-der-auftragsarten-d.pdf | Order type reference (DE) |
87
+
88
+ ---
89
+
90
+ ## 5. DFÜ-Abkommen — English Translation
91
+
92
+ | Document | Link | Content |
93
+ |---|---|---|
94
+ | **DFÜ Agreement Appendix 3 (EN, Isabel)** | https://www.isabel.eu/content/dam/knowledge_base_ibs6/documents/en-US/Anlage_3_Datenformate_V29_engl.pdf | Data formats (English translation) |
95
+
96
+ ---
97
+
98
+ ## 6. Reference Implementations (source code)
99
+
100
+ | Project | Link | Language | Versions |
101
+ |---|---|---|---|
102
+ | **ebics-client-php** | https://github.com/ebics-api/ebics-client-php | PHP | H003/H004/H005 |
103
+ | **ebics-java-client** | https://github.com/ebics-java/ebics-java-client | Java | H004 |
104
+ | **EBICS.php (Synap)** | https://github.com/Synap/EBICS.php | PHP | H003/H004 |
105
+ | **node-ebics-client** | https://github.com/nicemann/node-ebics-client | Node.js | H004 |
106
+ | **epics (railslove)** | https://github.com/railslove/epics | Ruby | H004 |
107
+ | **epics (our fork)** | https://github.com/jplot/epics | Ruby | H003/H004/H005 |
108
+
109
+ ---
110
+
111
+ ## 7. Third-party References
112
+
113
+ | Resource | Link | Content |
114
+ |---|---|---|
115
+ | **Wikipedia — EBICS** | https://en.wikipedia.org/wiki/Electronic_Banking_Internet_Communication_Standard | Overview |
116
+ | **Wikipedia — DFÜ-Abkommen** | https://de.wikipedia.org/wiki/Abkommen_%C3%BCber_die_Datenfern%C3%BCbertragung_zwischen_Kunden_und_Kreditinstituten | DFÜ-Abkommen (DE) |
117
+ | **Axway — EBICS standard** | https://docs.axway.com/bundle/EBICSClient_11_allOS_en_HTML5/page/the_ebics_standard.html | Axway reference |
118
+ | **Axway — EBICS error codes** | https://docs.axway.com/bundle/TransferCFT_332_LocalAdministrationGuide_allOS_en_HTML5/page/Content/Prots/French/EBICS/r_ebics_error_mess_codes.htm | Error codes (full list) |
119
+ | **IBM — EBICS return codes** | https://www.ibm.com/docs/SS3JSW_5.2.0/com.ibm.help.ebics_client_user_525.doc/EBICS_Client_returncodes_events.html | IBM return codes |
120
+ | **BL Banking — EBICS errors** | https://www.blbanking.de/webhelp/topic/de.businesslogics.banking.web/help/html/appendix/faq-ebicserrors.html | BL Banking error messages |
121
+ | **konfipay — BTF parameters** | https://wiki.konfipay.de/konfipay/btf-parameters-ebics-3-0 | BTF parameters |
122
+ | **Sage XRT — EBICS 3.0 Guide (FR)** | https://sxbe-onlinehelp.sage.com/PDF/SXBE/SXBE.12.1.EBICS.3.0.UserGuide_FR.pdf | Sage user guide |
123
+ | **UBS — EBICS 3.0** | https://www.ubs.com/ch/en/corporates/payment-solutions/cash-management/connection-ubs/ebics.html | UBS EBICS 3.0 page |
124
+ | **BCV — EBICS parameters factsheet** | https://www.bcv.ch/content/dam/bcv/brochure---flyer/44-516e_Fiche-technique-BCV-connect_web.pdf | BCV technical factsheet |
125
+
126
+ ---
127
+
128
+ ## 8. Local XSD Schemas in This Project
129
+
130
+ XSD schemas are stored in `spec/xsd/`:
131
+
132
+ ```
133
+ spec/xsd/
134
+ ├── H003/
135
+ │ └── (H003 schemas)
136
+ ├── H004/
137
+ │ ├── ebics_H004.xsd (H004 root schema)
138
+ │ ├── ebics_hev.xsd (HEV protocol)
139
+ │ ├── ebics_keymgmt_request_H004.xsd
140
+ │ ├── ebics_keymgmt_response_H004.xsd
141
+ │ ├── ebics_orders_H004.xsd (89K — order types)
142
+ │ ├── ebics_request_H004.xsd
143
+ │ ├── ebics_response_H004.xsd
144
+ │ ├── ebics_signature.xsd (S001)
145
+ │ ├── ebics_types_H004.xsd (86K — types)
146
+ │ └── xmldsig-core-schema.xsd
147
+ └── H005/
148
+ ├── ebics_H005.xsd (H005 root schema)
149
+ ├── ebics_hev.xsd
150
+ ├── ebics_keymgmt_request_H005.xsd
151
+ ├── ebics_keymgmt_response_H005.xsd
152
+ ├── ebics_orders_H005.xsd
153
+ ├── ebics_request_H005.xsd
154
+ ├── ebics_response_H005.xsd
155
+ ├── ebics_signature_S002.xsd (S002 — A005)
156
+ ├── ebics_types_H005.xsd
157
+ └── xmldsig-core-schema.xsd
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Notes
163
+
164
+ - Specifications on **ebics.org** require accepting terms of use before downloading
165
+ - Current version: **V3.0.2** (valid since December 30, 2022)
166
+ - Last BTF list update: **October 23, 2024**
167
+ - **DFÜ-Abkommen Anlage 3** is the reference document for data formats in Germany
168
+ - X/Y/Z prefixed order types = bank-individual (not core EBICS)
169
+ - FUL/FDL = core EBICS H003/H004, removed in H005 (replaced by BTU/BTD)