mirror of https://github.com/shred/acme4j
Let writeCertificate do what it did before (don't change existing API).
parent
df67f79484
commit
6f4176bb3a
|
@ -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.
|
* 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
|
* 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
|
* @param out
|
||||||
* {@link Writer} to write to. The writer is not closed after use.
|
* {@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 {
|
try {
|
||||||
AcmeUtils.writeToPem(getCertificate().getEncoded(), AcmeUtils.PemLabel.CERTIFICATE, out);
|
AcmeUtils.writeToPem(getCertificate().getEncoded(), AcmeUtils.PemLabel.CERTIFICATE, out);
|
||||||
} catch (CertificateEncodingException ex) {
|
} catch (CertificateEncodingException ex) {
|
||||||
|
|
Loading…
Reference in New Issue