From 93764aa9f03262c058f7dc437821093a743faa27 Mon Sep 17 00:00:00 2001 From: "roman.strobl@wultra.com" Date: Thu, 31 Aug 2023 19:30:47 +0200 Subject: [PATCH] Fix #518: Dereference null return value warning --- .../crypto/lib/encryptor/ecies/ClientEciesEncryptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/encryptor/ecies/ClientEciesEncryptor.java b/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/encryptor/ecies/ClientEciesEncryptor.java index a7eb39543..86cd1792e 100644 --- a/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/encryptor/ecies/ClientEciesEncryptor.java +++ b/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/encryptor/ecies/ClientEciesEncryptor.java @@ -159,7 +159,7 @@ public EncryptedRequest encryptRequest(byte[] data) throws EncryptorException { base64Encoder.encodeToString(eciesCryptogram.getEphemeralPublicKey()), base64Encoder.encodeToString(eciesCryptogram.getEncryptedData()), base64Encoder.encodeToString(eciesCryptogram.getMac()), - validator.isUseNonceForRequest() ? base64Encoder.encodeToString(requestNonce) : null, + validator.isUseNonceForRequest() && requestNonce != null ? base64Encoder.encodeToString(requestNonce) : null, requestTimestamp ); }