gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: minor fixes to /sync. Keys extraction


From: gnunet
Subject: [libeufin] branch master updated: minor fixes to /sync. Keys extraction missing.
Date: Fri, 08 Nov 2019 11:59:57 +0100

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

marcello pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new deca4cb  minor fixes to /sync.  Keys extraction missing.
deca4cb is described below

commit deca4cbdc5219cc209d78ac8f8210f63e2631099
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Nov 8 11:59:21 2019 +0100

    minor fixes to /sync.  Keys extraction missing.
---
 nexus/src/main/kotlin/Main.kt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/nexus/src/main/kotlin/Main.kt b/nexus/src/main/kotlin/Main.kt
index ae2a7a8..ca6a90a 100644
--- a/nexus/src/main/kotlin/Main.kt
+++ b/nexus/src/main/kotlin/Main.kt
@@ -322,7 +322,7 @@ fun main() {
                 // _parse_ response!
                 // respond to client
                 val id = expectId(call.parameters["id"])
-                val (url, body, encPriv) = transaction {
+                val (url, body, encPrivBlob) = transaction {
                     val subscriber = EbicsSubscriberEntity.findById(id) ?: 
throw SubscriberNotFoundError(HttpStatusCode.NotFound)
                     val hpbRequest = EbicsNpkdRequest().apply {
                         version = "H004"
@@ -349,9 +349,9 @@ fun main() {
                     val hpbDoc = XMLUtil.parseStringIntoDom(hpbText)
                     XMLUtil.signEbicsDocument(
                         hpbDoc,
-                        
CryptoUtil.loadRsaPrivateKey(subscriber.signaturePrivateKey.toByteArray())
+                        
CryptoUtil.loadRsaPrivateKey(subscriber.authenticationPrivateKey.toByteArray())
                     )
-                    Triple(subscriber.ebicsURL, hpbDoc, 
subscriber.encryptionPrivateKey)
+                    Triple(subscriber.ebicsURL, hpbDoc, 
subscriber.encryptionPrivateKey.toByteArray())
                 }
 
                 val response = 
client.postToBank<EbicsKeyManagementResponse>(url, body) ?: throw 
UnreachableBankError(
@@ -366,10 +366,10 @@ fun main() {
                     
response.value.body.dataTransfer!!.dataEncryptionInfo!!.transactionKey,
                     (response.value.body.dataTransfer!!.dataEncryptionInfo as 
EbicsTypes.DataEncryptionInfo)
                         .encryptionPubKeyDigest.value,
-                    (response.value.body.dataTransfer as 
EbicsKeyManagementResponse.OrderData).value
+                    response.value.body.dataTransfer!!.orderData.value
                 )
 
-                var dataCompr = CryptoUtil.decryptEbicsE002(er, 
CryptoUtil.loadRsaPrivateKey(encPriv.toByteArray()))
+                var dataCompr = CryptoUtil.decryptEbicsE002(er, 
CryptoUtil.loadRsaPrivateKey(encPrivBlob))
                 var data = 
EbicsOrderUtil.decodeOrderDataXml<HPBResponseOrderData>(dataCompr)
 
                 call.respond(HttpStatusCode.NotImplemented, NexusError("work 
in progress"))

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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