feat: Tertiary full chain supprt
- Technically, CAs and intermediate CAs do not use "fullchain" certificates, but it is useful to us to include the entire certificate chain in the leaf certificate
This commit is contained in:
parent
c7f05f1337
commit
b39242baba
1 changed files with 4 additions and 1 deletions
|
@ -106,7 +106,10 @@ public class OpenSSLCertificateCreator {
|
||||||
|
|
||||||
Path fullchain = tmpDir.resolve("fullchain.pem");
|
Path fullchain = tmpDir.resolve("fullchain.pem");
|
||||||
try {
|
try {
|
||||||
Files.write(fullchain, Files.readAllBytes(certAuthority.certificatePath()), StandardOpenOption.CREATE);
|
Path certAuthFullchain = Optional
|
||||||
|
.ofNullable(certAuthority.fullchainPath())
|
||||||
|
.orElse(certAuthority.certificatePath());
|
||||||
|
Files.write(fullchain, Files.readAllBytes(certAuthFullchain), StandardOpenOption.CREATE);
|
||||||
Files.write(fullchain, Files.readAllBytes(signedCert), StandardOpenOption.APPEND);
|
Files.write(fullchain, Files.readAllBytes(signedCert), StandardOpenOption.APPEND);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new CommandLineOperationException("Failed to create fullchain file.", e);
|
throw new CommandLineOperationException("Failed to create fullchain file.", e);
|
||||||
|
|
Loading…
Add table
Reference in a new issue