gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: Errors policy.


From: gnunet
Subject: [libeufin] branch master updated: Errors policy.
Date: Wed, 01 Sep 2021 10:59:35 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 8e34db6  Errors policy.
8e34db6 is described below

commit 8e34db6e3d5f0e0101d14931f96944693c459cdf
Author: MS <ms@taler.net>
AuthorDate: Tue Aug 31 21:57:05 2021 -1100

    Errors policy.
    
    No data available becomes non-error and non-verifying signatures
    get appropriate error code (they used to throw "invalid request").
---
 nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt      | 2 +-
 .../src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt   | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
index 65caf51..de8c8a2 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
@@ -84,7 +84,7 @@ suspend fun doEbicsDownloadTransaction(
     val initResponse = parseAndValidateEbicsResponse(subscriberDetails, 
initResponseStr)
 
     when (initResponse.technicalReturnCode) {
-        EbicsReturnCode.EBICS_OK -> {
+        EbicsReturnCode.EBICS_OK, 
EbicsReturnCode.EBICS_NO_DOWNLOAD_DATA_AVAILABLE -> {
             // Success, nothing to do!
         }
         else -> {
diff --git 
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index 4f28f08..5fc3ee0 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -79,6 +79,10 @@ class EbicsInvalidRequestError : EbicsRequestError(
     "[EBICS_INVALID_REQUEST] Invalid request",
     "060102"
 )
+class EbicsAccountAuthorisationFailed : EbicsRequestError(
+    "[EBICS_ACCOUNT_AUTHORISATION_FAILED] Subscriber's signature didn't 
verify",
+    "091302"
+)
 
 /**
  * This error is thrown whenever the Subscriber's state is not suitable
@@ -1357,7 +1361,7 @@ suspend fun ApplicationCall.ebicsweb() {
                 // Step 2 of 3:  Validate the signature
                 val verifyResult = 
XMLUtil.verifyEbicsDocument(requestDocument, requestContext.clientAuthPub)
                 if (!verifyResult) {
-                    throw EbicsInvalidRequestError()
+                    throw EbicsAccountAuthorisationFailed()
                 }
                 // Step 3 of 3:  Generate response
                 val ebicsResponse: EbicsResponse = when 
(requestObject.header.mutable.transactionPhase) {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]