[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: fix JAXB error
From: |
gnunet |
Subject: |
[libeufin] branch master updated: fix JAXB error |
Date: |
Wed, 06 Nov 2019 13:00:28 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 265887f fix JAXB error
265887f is described below
commit 265887f763d21b0d966928df07663e476f548491
Author: Florian Dold <address@hidden>
AuthorDate: Wed Nov 6 13:00:16 2019 +0100
fix JAXB error
---
.../src/main/kotlin/tech/libeufin/sandbox/Main.kt | 24 ++++++++++++++++++++++
.../libeufin/schema/ebics_s001/EbicsMessages.kt | 5 ++---
2 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index c4d4b6a..11db448 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -341,6 +341,30 @@ private suspend fun ApplicationCall.ebicsweb() {
}
}
"ebicsRequest" -> {
+ println("ebicsRequest
${XMLUtil.convertDomToString(requestDocument)}")
+ val requestObject = requestDocument.toObject<EbicsRequest>()
+ val staticHeader = requestObject.header.static
+ when (requestObject.header.mutable.transactionPhase) {
+ EbicsTypes.TransactionPhaseType.INITIALISATION -> {
+ val partnerID = staticHeader.partnerID ?: throw
EbicsInvalidXmlError()
+ val userID = staticHeader.userID ?: throw
EbicsInvalidXmlError()
+ transaction {
+ val subscriber =
+ findEbicsSubscriber(partnerID, userID,
staticHeader.systemID)
+ ?: throw EbicsInvalidXmlError()
+ val authPub =
+
CryptoUtil.loadRsaPublicKey(subscriber.authenticationKey!!.rsaPublicKey.toByteArray())
+ val verifyResult =
XMLUtil.verifyEbicsDocument(requestDocument, authPub)
+ println("ebicsRequest verification result:
$verifyResult")
+ }
+ }
+ EbicsTypes.TransactionPhaseType.TRANSFER -> {
+
+ }
+ EbicsTypes.TransactionPhaseType.RECEIPT -> {
+
+ }
+ }
}
else -> {
/* Log to console and return "unknown type" */
diff --git
a/sandbox/src/main/kotlin/tech/libeufin/schema/ebics_s001/EbicsMessages.kt
b/sandbox/src/main/kotlin/tech/libeufin/schema/ebics_s001/EbicsMessages.kt
index 3e5de0c..39924a0 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/schema/ebics_s001/EbicsMessages.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/schema/ebics_s001/EbicsMessages.kt
@@ -31,8 +31,7 @@ import javax.xml.datatype.XMLGregorianCalendar
@XmlType(
name = "PubKeyValueType", namespace = "http://www.ebics.org/S001",
propOrder = [
"rsaKeyValue",
- "timeStamp",
- "any"
+ "timeStamp"
]
)
class PubKeyValueType {
@@ -73,7 +72,7 @@ class SignaturePubKeyInfoType {
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(
name = "",
- propOrder = ["signaturePubKeyInfo", "partnerID", "userID", "any"]
+ propOrder = ["signaturePubKeyInfo", "partnerID", "userID"]
)
@XmlRootElement(name = "SignaturePubKeyOrderData")
class SignaturePubKeyOrderData {
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: fix JAXB error,
gnunet <=