[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: get TST message to validate
From: |
gnunet |
Subject: |
[libeufin] branch master updated: get TST message to validate |
Date: |
Mon, 18 Nov 2019 19:35:03 +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 923b242 get TST message to validate
923b242 is described below
commit 923b242021397f14011e9d5abab8a5519361cd2d
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Nov 18 19:34:55 2019 +0100
get TST message to validate
---
nexus/src/main/kotlin/Main.kt | 49 ++++++++++++----------
.../main/kotlin/tech/libeufin/sandbox/XMLUtil.kt | 2 +-
2 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/nexus/src/main/kotlin/Main.kt b/nexus/src/main/kotlin/Main.kt
index 58b5461..4c20aa6 100644
--- a/nexus/src/main/kotlin/Main.kt
+++ b/nexus/src/main/kotlin/Main.kt
@@ -667,7 +667,7 @@ fun main() {
return@post
}
- post("/ebics/subscribers/{id}/sync") {
+ post("/ebics/subscribers/{id}/sendTst") {
val id = expectId(call.parameters["id"])
val (url, doc) = transaction {
@@ -713,6 +713,7 @@ fun main() {
orderDetails =
EbicsRequest.OrderDetails().apply {
orderType = "TST"
orderAttribute = "OZHNN"
+ orderParams =
EbicsRequest.StandardOrderParams()
}
bankPubKeyDigests =
EbicsRequest.BankPubKeyDigests().apply {
authentication =
EbicsTypes.PubKeyDigest().apply {
@@ -727,38 +728,35 @@ fun main() {
version = "E002"
value =
CryptoUtil.getEbicsPublicKeyHash(
CryptoUtil.loadRsaPublicKey(subscriber.bankEncryptionPublicKey!!.toByteArray())
-
)
}
}
securityMedium = "0000"
numSegments = BigInteger.ONE
-
- authSignature = SignatureType()
}
mutable = EbicsRequest.MutableHeader().apply {
transactionPhase =
EbicsTypes.TransactionPhaseType.INITIALISATION
}
- body = EbicsRequest.Body().apply {
- dataTransfer =
EbicsRequest.DataTransfer().apply {
- signatureData =
EbicsRequest.SignatureData().apply {
- authenticate = true
- value = usd_encrypted.encryptedData
- }
- dataEncryptionInfo =
EbicsTypes.DataEncryptionInfo().apply {
- transactionKey =
usd_encrypted.encryptedTransactionKey
- authenticate = true
- encryptionPubKeyDigest =
EbicsTypes.PubKeyDigest().apply {
- algorithm =
"http://www.w3.org/2001/04/xmlenc#sha256"
- version = "E002"
- value =
CryptoUtil.getEbicsPublicKeyHash(
- CryptoUtil.loadRsaPublicKey(
-
subscriber.bankEncryptionPublicKey!!.toByteArray()
- )
+ }
+ authSignature = SignatureType()
+ body = EbicsRequest.Body().apply {
+ dataTransfer = EbicsRequest.DataTransfer().apply {
+ signatureData =
EbicsRequest.SignatureData().apply {
+ authenticate = true
+ value = usd_encrypted.encryptedData
+ }
+ dataEncryptionInfo =
EbicsTypes.DataEncryptionInfo().apply {
+ transactionKey =
usd_encrypted.encryptedTransactionKey
+ authenticate = true
+ encryptionPubKeyDigest =
EbicsTypes.PubKeyDigest().apply {
+ algorithm =
"http://www.w3.org/2001/04/xmlenc#sha256"
+ version = "E002"
+ value =
CryptoUtil.getEbicsPublicKeyHash(
+ CryptoUtil.loadRsaPublicKey(
+
subscriber.bankEncryptionPublicKey!!.toByteArray()
)
- }
+ )
}
- hostId = subscriber.hostID
}
}
}
@@ -773,6 +771,13 @@ fun main() {
}
// send document here
+ val response = client.postToBank<EbicsResponse>(url, doc)
+
+ call.respondText(
+ "not implemented\n",
+ ContentType.Text.Plain,
+ HttpStatusCode.OK
+ )
}
post("/ebics/subscribers/{id}/sync") {
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/XMLUtil.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/XMLUtil.kt
index 0538984..b80a0b6 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/XMLUtil.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/XMLUtil.kt
@@ -161,7 +161,7 @@ class XMLUtil private constructor() {
try {
getEbicsValidator().validate(xmlDoc)
} catch (e: Exception) {
- logger.warn("Validation failed: {}", e)
+ logger.warn("Validation failed: ${e}")
return false
}
return true;
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: get TST message to validate,
gnunet <=