private static KeyStore createKeystore(Path privateKey, Path certificateChain) {
        try {
            return KeyStoreBuilder.withType(KeyStoreType.PKCS12)
                    .withKeyEntry(
                            CERTIFICATE_ALIAS,
                            KeyUtils.fromPemEncodedPrivateKey(Files.readString(privateKey)),
                            X509CertificateUtils.certificateListFromPem(Files.readString(certificateChain)))
                    .build();
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
A {@link X509ExtendedKeyManager} that reloads the certificate and private key from file regularly.

@author bjorncs
security-utils/src/main/java/com/yahoo/security/AutoReloadingX509KeyManager.java