commit a52cf289234683c4ff492cd8b508cfb6c85ca1e8
parent 4caddb56c35f70a1ba5f1d685876b391d4b607ae
Author: MS <ms@taler.net>
Date: Thu, 4 May 2023 15:54:40 +0200
EBICS connection.
Showing bank's keys too, along all the connection details.
Diffstat:
1 file changed, 27 insertions(+), 0 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
@@ -683,6 +683,33 @@ class EbicsBankConnectionProtocol: BankConnectionProtocol {
details.put("ebicsHostId", ebicsSubscriber.hostId)
details.put("partnerId", ebicsSubscriber.partnerId)
details.put("userId", ebicsSubscriber.userId)
+
+ details.put(
+ "customerAuthKeyHash",
+ CryptoUtil.getEbicsPublicKeyHash(
+ CryptoUtil.getRsaPublicFromPrivate(ebicsSubscriber.customerAuthPriv)
+ ).toHexString()
+ )
+ details.put(
+ "customerEncKeyHash",
+ CryptoUtil.getEbicsPublicKeyHash(
+ CryptoUtil.getRsaPublicFromPrivate(ebicsSubscriber.customerEncPriv)
+ ).toHexString()
+ )
+ val bankAuthPubImmutable = ebicsSubscriber.bankAuthPub
+ if (bankAuthPubImmutable != null) {
+ details.put(
+ "bankAuthKeyHash",
+ CryptoUtil.getEbicsPublicKeyHash(bankAuthPubImmutable).toHexString()
+ )
+ }
+ val bankEncPubImmutable = ebicsSubscriber.bankEncPub
+ if (bankEncPubImmutable != null) {
+ details.put(
+ "bankEncKeyHash",
+ CryptoUtil.getEbicsPublicKeyHash(bankEncPubImmutable).toHexString()
+ )
+ }
val node = mapper.createObjectNode()
node.put("type", conn.type)
node.put("owner", conn.owner.username)