commit a4deaed26011edcc5bc4ea79a02817d8d6a5b986
parent d61fa04108b0a278b42877b6d9cf70f3d70f8cf3
Author: MS <ms@taler.net>
Date: Sat, 4 Sep 2021 08:20:01 +0000
FIXME
Diffstat:
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsNexus.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsNexus.kt
@@ -807,6 +807,13 @@ class EbicsBankConnectionProtocol: BankConnectionProtocol {
}
if (subscriber.ebicsIniState == EbicsInitState.UNKNOWN || subscriber.ebicsHiaState == EbicsInitState.UNKNOWN) {
if (tentativeHpb(client, connId)) {
+ /**
+ * NOTE/FIXME: in case the HIA/INI did succeed (state is UNKNOWN but Sandbox
+ * has somehow the keys), here the state should be set to SENT, because later -
+ * when the Sandbox will respond to the INI/HIA requests - we'll get a
+ * EBICS_INVALID_USER_OR_USER_STATE. Hence, the state will never switch to
+ * SENT again.
+ */
return
}
}
@@ -827,7 +834,7 @@ class EbicsBankConnectionProtocol: BankConnectionProtocol {
val hpbData = try {
doEbicsHpbRequest(client, subscriber)
} catch (e: EbicsProtocolError) {
- logger.warn("failed hpb request", e)
+ logger.warn("failed HPB request", e)
null
}
transaction {
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -787,7 +787,7 @@ private suspend fun ApplicationCall.handleEbicsHia(header: EbicsUnsecuredRequest
val plainOrderData = InflaterInputStream(orderData.inputStream()).use {
it.readAllBytes()
}
- println("hia order data: ${plainOrderData.toString(Charsets.UTF_8)}")
+ println("HIA order data: ${plainOrderData.toString(Charsets.UTF_8)}")
val keyObject = EbicsOrderUtil.decodeOrderDataXml<HIARequestOrderData>(orderData)
val encPubXml = keyObject.encryptionPubKeyInfo.pubKeyValue.rsaKeyValue
@@ -835,7 +835,7 @@ private suspend fun ApplicationCall.handleEbicsIni(header: EbicsUnsecuredRequest
val plainOrderData = InflaterInputStream(orderData.inputStream()).use {
it.readAllBytes()
}
- println("ini order data: ${plainOrderData.toString(Charsets.UTF_8)}")
+ println("INI order data: ${plainOrderData.toString(Charsets.UTF_8)}")
val keyObject = EbicsOrderUtil.decodeOrderDataXml<SignatureTypes.SignaturePubKeyOrderData>(orderData)
val sigPubXml = keyObject.signaturePubKeyInfo.pubKeyValue.rsaKeyValue