From 288bf31c24dc65294f19a3397c27f2e4b75f3219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20K=C3=B6rber?= Date: Thu, 9 Jun 2016 22:55:53 +0200 Subject: [PATCH] AcmeProtocolException is sufficient for recursion excess --- .../java/org/shredzone/acme4j/impl/AbstractAcmeClient.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/acme4j-client/src/main/java/org/shredzone/acme4j/impl/AbstractAcmeClient.java b/acme4j-client/src/main/java/org/shredzone/acme4j/impl/AbstractAcmeClient.java index a7533e47..19990064 100644 --- a/acme4j-client/src/main/java/org/shredzone/acme4j/impl/AbstractAcmeClient.java +++ b/acme4j-client/src/main/java/org/shredzone/acme4j/impl/AbstractAcmeClient.java @@ -465,8 +465,11 @@ public abstract class AbstractAcmeClient implements AcmeClient { throw new AcmeNetworkException(ex); } } - if (link != null) - throw new AcmeException("Recursion limit reached (" + MAX_CHAIN_LENGTH + "). Didn't get " + link); + } + if (link != null) { + throw new AcmeProtocolException("Recursion limit reached (" + MAX_CHAIN_LENGTH + + "). Didn't get " + link); + } return certChain.toArray(new X509Certificate[certChain.size()]); }