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 * {@link Registration} to be used for conversation
* @param csr * @param csr
* PKCS#10 Certificate Signing Request to be sent to the server * 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; CertificateURIs requestCertificate(Registration registration, byte[] csr) throws AcmeException;
@ -145,10 +146,6 @@ public interface AcmeClient {
* @param chainCertUri * @param chainCertUri
* Certificate {@link URI} * Certificate {@link URI}
* @return Downloaded {@link X509Certificate[]} * @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; X509Certificate[] downloadCertificateChain(URI chainCertUri) throws AcmeException;

View File

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

View File

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

View File

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