gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: DCE


From: gnunet
Subject: [libeufin] branch master updated: DCE
Date: Fri, 27 Oct 2023 12:55:29 +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 1426da59 DCE
1426da59 is described below

commit 1426da597576efe54bc677df30246c966a38990a
Author: MS <ms@taler.net>
AuthorDate: Fri Oct 27 12:55:26 2023 +0200

    DCE
---
 .../main/kotlin/tech/libeufin/nexus/EbicsSetup.kt  | 59 +++-------------------
 1 file changed, 6 insertions(+), 53 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSetup.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSetup.kt
index c2385304..85b47df3 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSetup.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSetup.kt
@@ -59,6 +59,12 @@ inline fun <reified T> syncJsonToDisk(obj: T, location: 
String): Boolean {
     }
     return true
 }
+
+/**
+ * Generates new client private keys.
+ *
+ * @return [ClientPrivateKeysFile]
+ */
 fun generateNewKeys(): ClientPrivateKeysFile =
     ClientPrivateKeysFile(
         authentication_private_key = 
CryptoUtil.generateRsaKeyPair(2048).private,
@@ -252,59 +258,6 @@ suspend fun doKeysRequestAndUpdateState(
     return true
 }
 
-/**
- * Abstracts (part of) the IBAN extraction from an HTD response.
- */
-private fun maybeExtractIban(accountNumberList: 
List<EbicsTypes.AbstractAccountNumber>): String? =
-    accountNumberList.filterIsInstance<EbicsTypes.GeneralAccountNumber>().find 
{ it.international }?.value
-
-/**
- * Abstracts (part of) the BIC extraction from an HTD response.
- */
-private fun maybeExtractBic(bankCodes: List<EbicsTypes.AbstractBankCode>): 
String? =
-    bankCodes.filterIsInstance<EbicsTypes.GeneralBankCode>().find { 
it.international }?.value
-
-private fun findIban(maybeList: List<EbicsTypes.AccountInfo>?): String? {
-    if (maybeList == null) {
-        logger.warn("Looking for IBAN: bank did not give any account list for 
us.")
-        return null
-    }
-    if (maybeList.size != 1) {
-        logger.warn("Looking for IBAN: bank gave account list, but it was not 
a singleton.")
-        return null
-    }
-    val accountNumberList = maybeList[0].accountNumberList
-    if (accountNumberList == null) {
-        logger.warn("Bank gave account list, but no IBAN list of found.")
-        return null
-    }
-    if (accountNumberList.size != 1) {
-        logger.warn("Bank gave account list, but IBAN list was not singleton.")
-        return null
-    }
-    return maybeExtractIban(accountNumberList)
-}
-private fun findBic(maybeList: List<EbicsTypes.AccountInfo>?): String? {
-    if (maybeList == null) {
-        logger.warn("Looking for BIC: bank did not give any account list for 
us.")
-        return null
-    }
-    if (maybeList.size != 1) {
-        logger.warn("Looking for BIC: bank gave account list, but it was not a 
singleton.")
-        return null
-    }
-    val bankCodeList = maybeList[0].bankCodeList
-    if (bankCodeList == null) {
-        logger.warn("Bank gave account list, but no BIC list of found.")
-        return null
-    }
-    if (bankCodeList.size != 1) {
-        logger.warn("Bank gave account list, but BIC list was not singleton.")
-        return null
-    }
-    return maybeExtractBic(bankCodeList)
-}
-
 /**
  * Mere collector of the steps to load and parse the config.
  *

-- 
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]