[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: address null pointer exception
From: |
gnunet |
Subject: |
[libeufin] branch master updated: address null pointer exception |
Date: |
Thu, 21 Nov 2019 15:48: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 7328033 address null pointer exception
7328033 is described below
commit 7328033e05bbd0ce75012e0ea56ca95e0963ce51
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Nov 21 15:48:26 2019 +0100
address null pointer exception
---
nexus/src/main/kotlin/Main.kt | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/nexus/src/main/kotlin/Main.kt b/nexus/src/main/kotlin/Main.kt
index 1124953..c107bec 100644
--- a/nexus/src/main/kotlin/Main.kt
+++ b/nexus/src/main/kotlin/Main.kt
@@ -851,7 +851,8 @@ fun main() {
val usd_compressed =
EbicsOrderUtil.encodeOrderDataXml(userSignatureData)
val usd_encrypted = CryptoUtil.encryptEbicsE002(
usd_compressed,
-
CryptoUtil.loadRsaPublicKey(subscriber.bankEncryptionPublicKey!!.toByteArray()
+ CryptoUtil.loadRsaPublicKey(
+ subscriber.bankEncryptionPublicKey?.toByteArray()
?: throw BankKeyMissing(HttpStatusCode.NotFound)
)
)
@@ -876,14 +877,21 @@ fun main() {
algorithm =
"http://www.w3.org/2001/04/xmlenc#sha256"
version = "X002"
value =
CryptoUtil.getEbicsPublicKeyHash(
-
CryptoUtil.loadRsaPublicKey(subscriber.bankAuthenticationPublicKey!!.toByteArray())
+ CryptoUtil.loadRsaPublicKey(
+
subscriber.bankAuthenticationPublicKey?.toByteArray() ?: throw BankKeyMissing(
+
HttpStatusCode.PreconditionFailed)
+ )
)
}
encryption =
EbicsTypes.PubKeyDigest().apply {
algorithm =
"http://www.w3.org/2001/04/xmlenc#sha256"
version = "E002"
value =
CryptoUtil.getEbicsPublicKeyHash(
-
CryptoUtil.loadRsaPublicKey(subscriber.bankEncryptionPublicKey!!.toByteArray())
+ CryptoUtil.loadRsaPublicKey(
+
subscriber.bankEncryptionPublicKey?.toByteArray() ?: throw BankKeyMissing(
+
HttpStatusCode.PreconditionFailed
+ )
+ )
)
}
}
@@ -909,7 +917,9 @@ fun main() {
version = "E002"
value =
CryptoUtil.getEbicsPublicKeyHash(
CryptoUtil.loadRsaPublicKey(
-
subscriber.bankEncryptionPublicKey!!.toByteArray()
+
subscriber.bankEncryptionPublicKey?.toByteArray() ?: throw BankKeyMissing(
+
HttpStatusCode.PreconditionFailed
+ )
)
)
}
@@ -922,11 +932,12 @@ fun main() {
jaxb = tmp,
ebicsUrl = subscriber.ebicsURL,
bankAuthPubBlob =
subscriber.bankAuthenticationPublicKey?.toByteArray() ?: throw BankKeyMissing(
- HttpStatusCode.NotAcceptable),
+ HttpStatusCode.PreconditionFailed
+ ),
plainTransactionKey =
usd_encrypted.plainTransactionKey,
customerAuthPrivBlob =
subscriber.authenticationPrivateKey.toByteArray(),
bankEncPubBlob =
subscriber.bankEncryptionPublicKey?.toByteArray() ?: throw BankKeyMissing(
- HttpStatusCode.NotAcceptable
+ HttpStatusCode.PreconditionFailed
),
hostId = subscriber.hostID
)
@@ -983,8 +994,8 @@ fun main() {
val responseTransaction =
client.postToBankSignedAndVerify<EbicsRequest, EbicsResponse>(
container.ebicsUrl,
tmp,
- CryptoUtil.loadRsaPublicKey(container.bankAuthPubBlob!!),
-
CryptoUtil.loadRsaPrivateKey(container.customerAuthPrivBlob!!)
+ CryptoUtil.loadRsaPublicKey(container.bankAuthPubBlob),
+
CryptoUtil.loadRsaPrivateKey(container.customerAuthPrivBlob)
)
if (responseTransaction.value.body.returnCode.value !=
"000000") {
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: address null pointer exception,
gnunet <=