Minor formatting fixes

pull/18/head
Richard Körber 2016-06-09 22:56:13 +02:00
parent 288bf31c24
commit 1c2b7392e4
4 changed files with 9 additions and 15 deletions

View File

@ -135,7 +135,8 @@ public interface AcmeClient {
* {@link Registration} to be used for conversation
* @param csr
* PKCS#10 Certificate Signing Request to be sent to the server
* @return {@link CertificateURIs} the certificate and certificate chain can be downloaded from
* @return {@link CertificateURIs} the certificate and certificate chain can be
* downloaded from
*/
CertificateURIs requestCertificate(Registration registration, byte[] csr) throws AcmeException;
@ -145,10 +146,6 @@ public interface AcmeClient {
* @param chainCertUri
* Certificate {@link URI}
* @return Downloaded {@link X509Certificate[]}
*
* @throws AcmeException
* if an {@link IOException} is thrown during certificate retrieval
* or the max recursion limit is exceeded
*/
X509Certificate[] downloadCertificateChain(URI chainCertUri) throws AcmeException;

View File

@ -19,7 +19,6 @@ import java.net.URI;
* Represents the URIs returned by a certificate request
*
* @author cargy
*
*/
public class CertificateURIs {
@ -34,8 +33,7 @@ public class CertificateURIs {
/**
* The URI from which the client may fetch the certificate
*
* @return
* {@link URI} the certificate can be downloaded from
* @return {@link URI} the certificate can be downloaded from
*/
public URI getCertUri() {
return certUri;
@ -44,8 +42,7 @@ public class CertificateURIs {
/**
* The URI from which the client may fetch a chain of CA certificates
*
* @return
* {@link URI} the certificate chain can be downloaded from
* @return {@link URI} the certificate chain can be downloaded from
*/
public URI getChainCertUri() {
return chainCertUri;

View File

@ -446,7 +446,7 @@ public abstract class AbstractAcmeClient implements AcmeClient {
public X509Certificate[] downloadCertificateChain(URI chainCertUri) throws AcmeException {
if (chainCertUri == null) {
throw new NullPointerException("certChainUri must not be null");
}
}
LOG.debug("getCertificateChain");
@ -461,9 +461,8 @@ public abstract class AbstractAcmeClient implements AcmeClient {
certChain.add(conn.readCertificate());
link = conn.getLink("up");
} catch (IOException ex) {
throw new AcmeNetworkException(ex);
}
} catch (IOException ex) {
throw new AcmeNetworkException(ex);
}
}
if (link != null) {

View File

@ -104,8 +104,9 @@ public final class CertificateUtils {
*/
public static void writeX509CertificateChain(X509Certificate[] chain, Writer w) throws IOException {
try (JcaPEMWriter jw = new JcaPEMWriter(w)) {
for (X509Certificate cert : chain)
for (X509Certificate cert : chain) {
jw.writeObject(cert);
}
}
}