feat: Implement Truststore/Keystore creation #17

Merged
MarkL4YG merged 3 commits from feat/truststorePoc into main 2024-11-23 19:24:43 +00:00
Showing only changes of commit 8ffac7e02c - Show all commits

View file

@ -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);
} }