private GeneralNames san() throws IOException {
    GeneralNames names = new GeneralNames();
    for (String name : dnsNames) {
      names.add(CertificateBuilder.dnsGeneralName(name));
    }

    for (InetAddress address : ipAddresses) {
      names.add(CertificateBuilder.ipGeneralName(address));
    }

    return names;
  }
Class which allows easily building certificates. It can also be used to build
Certificate Authorities. The class is intended to be used in conjunction with {@link CertStores}
to facilitate building key and trust stores.
geode-junit/src/main/java/org/apache/geode/cache/ssl/CertificateBuilder.java