feat: Implement Truststore/Keystore creation #17
1 changed files with 2 additions and 2 deletions
|
@ -140,8 +140,8 @@ public class OpenSSLCertificateCreator {
|
||||||
.ofNullable(certAuthority.fullchainPath())
|
.ofNullable(certAuthority.fullchainPath())
|
||||||
.orElse(certAuthority.certificatePath());
|
.orElse(certAuthority.certificatePath());
|
||||||
// Leaf certificate first, then the CA chain
|
// Leaf certificate first, then the CA chain
|
||||||
Files.write(fullchain, Files.readAllBytes(signedCert), StandardOpenOption.APPEND);
|
Files.write(fullchain, Files.readAllBytes(signedCert), StandardOpenOption.CREATE);
|
||||||
Files.write(fullchain, Files.readAllBytes(certAuthFullchain), StandardOpenOption.CREATE);
|
Files.write(fullchain, Files.readAllBytes(certAuthFullchain), 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