private static Path createTrustStore(final Certificate certificate)
      throws IOException, GeneralSecurityException {
    final KeyStore keyStore = KeyStore.getInstance("PKCS12");
    keyStore.load(null);
    keyStore.setCertificateEntry(alias, certificate);
    return saveStore(keyStore);
  }
Utility class to generate temporary self-signed certificates in PKCS12 format for testing
purposes using BouncyCastle APIs. The generated certificate supports SAN extension for multiple
DNS and IP addresses

<p>Note: DO NOT USE IN PRODUCTION. The generated stores and files are marked to be deleted on JVM
exit.
ethereum/api/src/test-support/java/org/hyperledger/besu/ethereum/api/tls/SelfSignedP12Certificate.java