private static void writePemFile(byte[] content, String label, String outputPath) 
            throws IOException {
        String pem = toPem(content, label);
        Files.write(Path.of(outputPath), pem.getBytes(StandardCharsets.UTF_8));
    }
Writes the given byte[] (e.g. DER-encoded certificate) as a PEM file with the specified label.
integration/logstash-plugins/logstash-output-vespa/src/main/java/org/logstashplugins/SelfSignedCertGenerator.java