From d40505ed35a8db7d242a8b218297e322350722b3 Mon Sep 17 00:00:00 2001 From: lalber Date: Thu, 5 Nov 2020 12:18:26 +0100 Subject: Test fixes --- .../eidas/specific/modules/auth/eidas/v2/szr/SzrClient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main') diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/szr/SzrClient.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/szr/SzrClient.java index d2ce2f5d..69b993a4 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/szr/SzrClient.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/szr/SzrClient.java @@ -234,7 +234,7 @@ public class SzrClient { throw new SzrCommunicationException("ernb.02", new Object[]{e.getMessage()}, e); } - if (resp == null || StringUtils.isEmpty(resp)) { + if (StringUtils.isEmpty(resp)) { throw new SzrCommunicationException("ernb.01", new Object[]{"Stammzahl response empty"}); // TODO error handling } @@ -277,9 +277,9 @@ public class SzrClient { final SignContentResponseType resp = szr.signContent(req.isAppendCert(), req.getJWSHeaderParam(), req.getIn()); log.trace("Receive SZR response on bcBind siging operation "); - if (resp == null + if (resp == null || resp.getOut() == null || resp.getOut().isEmpty() - || resp.getOut().get(0).getValue() == null) { + || StringUtils.isEmpty(resp.getOut().get(0).getValue())) { throw new SzrCommunicationException("ernb.01", new Object[]{"BcBind response empty"}); } -- cgit v1.2.3