gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: minor adjustement


From: gnunet
Subject: [libeufin] branch master updated: minor adjustement
Date: Thu, 21 Nov 2019 05:22:58 +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 e8b5e07  minor adjustement
e8b5e07 is described below

commit e8b5e07b8f2d27a840848e01540a01dce45d2dc8
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Nov 21 05:22:51 2019 +0100

    minor adjustement
---
 nexus/src/main/kotlin/JSON.kt |  4 ++--
 nexus/src/main/kotlin/Main.kt | 22 ++++++++++++----------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/nexus/src/main/kotlin/JSON.kt b/nexus/src/main/kotlin/JSON.kt
index 7dcb0a6..42aa7ee 100644
--- a/nexus/src/main/kotlin/JSON.kt
+++ b/nexus/src/main/kotlin/JSON.kt
@@ -15,10 +15,10 @@ data class EbicsBackupRequest(
  * the client must provide the passphrase.
  */
 data class EbicsKeysBackup(
-    val passphrase: String? = null,
     val authBlob: ByteArray,
     val encBlob: ByteArray,
-    val sigBlob: ByteArray
+    val sigBlob: ByteArray,
+    val passphrase: String? = null
 )
 
 /**
diff --git a/nexus/src/main/kotlin/Main.kt b/nexus/src/main/kotlin/Main.kt
index 26efa7c..a3d528e 100644
--- a/nexus/src/main/kotlin/Main.kt
+++ b/nexus/src/main/kotlin/Main.kt
@@ -751,21 +751,23 @@ fun main() {
 
                 val (authKey, encKey, sigKey) = try {
 
-                    val authKey = CryptoUtil.decryptKey(
-                        EncryptedPrivateKeyInfo(body.authBlob), 
body.passphrase!!
-                    )
+                    Triple(
 
-                    val encKey = CryptoUtil.decryptKey(
-                        EncryptedPrivateKeyInfo(body.encBlob), body.passphrase
-                    )
+                        CryptoUtil.decryptKey(
+                            EncryptedPrivateKeyInfo(body.authBlob), 
body.passphrase!!
+                        ),
 
-                    val sigKey = CryptoUtil.decryptKey(
-                        EncryptedPrivateKeyInfo(body.sigBlob), body.passphrase
-                    )
+                        CryptoUtil.decryptKey(
+                            EncryptedPrivateKeyInfo(body.encBlob), 
body.passphrase
+                        ),
 
-                    Triple(authKey, encKey, sigKey)
+                        CryptoUtil.decryptKey(
+                            EncryptedPrivateKeyInfo(body.sigBlob), 
body.passphrase
+                        )
+                    )
 
                 } catch (e: Exception) {
+                    e.printStackTrace()
                     throw BadBackup(HttpStatusCode.BadRequest)
                 }
 

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



reply via email to

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