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
cf48aced6d
commit
4928da2336
1 changed files with 4 additions and 1 deletions
|
@ -106,7 +106,10 @@ public class OpenSSLCertificateCreator {
|
|||
|
||||
Path fullchain = tmpDir.resolve("fullchain.pem");
|
||||
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);
|
||||
} catch (IOException e) {
|
||||
throw new CommandLineOperationException("Failed to create fullchain file.", e);
|
||||
|
|
Loading…
Add table
Reference in a new issue