commit f6e7b7c1f314f4783f213e65dd23856f5a8a68ad
parent f2ace12fb84a83a911c9132dd332ae94c2d7b3db
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Fri, 15 Nov 2019 19:46:50 +0100
fix signature type
Diffstat:
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -594,7 +594,7 @@ suspend fun ApplicationCall.ebicsweb() {
requestObject.body.dataTransfer?.dataEncryptionInfo?.encryptionPubKeyDigest?.value
if (encPubKeyDigest == null)
throw EbicsInvalidRequestError()
- val encSigData = requestObject.body.dataTransfer?.signatureData
+ val encSigData = requestObject.body.dataTransfer?.signatureData?.value
if (encSigData == null)
throw EbicsInvalidRequestError()
val decryptedSignatureData = CryptoUtil.decryptEbicsE002(
diff --git a/sandbox/src/main/kotlin/tech/libeufin/schema/ebics_h004/EbicsRequest.kt b/sandbox/src/main/kotlin/tech/libeufin/schema/ebics_h004/EbicsRequest.kt
@@ -200,16 +200,30 @@ class EbicsRequest {
}
@XmlAccessorType(XmlAccessType.NONE)
- @XmlType(propOrder = ["dataEncryptionInfo", "signatureData", "orderData"])
+ class SignatureDataType {
+ @get:XmlAttribute(name = "authenticate", required = true)
+ var authenticate: Boolean = false
+
+ @get:XmlValue
+ var value: ByteArray? = null
+ }
+
+
+ @XmlAccessorType(XmlAccessType.NONE)
+ @XmlType(propOrder = ["dataEncryptionInfo", "signatureData", "orderData", "hostId"])
class DataTransfer {
+
@get:XmlElement(name = "DataEncryptionInfo")
var dataEncryptionInfo: EbicsTypes.DataEncryptionInfo? = null
@get:XmlElement(name = "SignatureData")
- var signatureData: ByteArray? = null
+ var signatureData: SignatureDataType? = null
@get:XmlElement(name = "OrderData")
var orderData: ByteArray? = null
+
+ @get:XmlElement(name = "HostID")
+ var hostId: String? = null
}
@XmlAccessorType(XmlAccessType.NONE)