Let writeCertificate do what it did before (don't change existing API).

pull/61/head
Jan Michael Greiner 2018-04-10 00:00:41 +02:00
parent df67f79484
commit 6f4176bb3a
1 changed files with 16 additions and 1 deletions

View File

@ -114,6 +114,21 @@ public class Certificate extends AcmeResource {
}
}
/**
* Writes the certificate and the intermediate certificates to the given writer.
* They are written in PEM format, with the end-entity cert coming first, followed
* by the intermediate certificates.
* This method just calls writeCertificateAndChain.
*
* @see #writeCertificateAndChain
*
* @param out
* {@link Writer} to write to. The writer is not closed after use.
*/
public void writeCertificate(@WillNotClose Writer out) throws IOException {
writeCertificateAndChain(out);
}
/**
* Writes the certificate and the intermediate certificates to the given writer.
* They are written in PEM format, with the end-entity cert coming first, followed
@ -138,7 +153,7 @@ public class Certificate extends AcmeResource {
* @param out
* {@link Writer} to write to. The writer is not closed after use.
*/
public void writeCertificate(@WillNotClose Writer out) throws IOException {
public void writeCertificateOnly(@WillNotClose Writer out) throws IOException {
try {
AcmeUtils.writeToPem(getCertificate().getEncoded(), AcmeUtils.PemLabel.CERTIFICATE, out);
} catch (CertificateEncodingException ex) {