@Override public Certificate[] getLocalCertificates() {
    Handshake handshake = handshake();
    if (handshake == null) return null;
    List<Certificate> result = handshake.localCertificates();
    return !result.isEmpty() ? result.toArray(new Certificate[result.size()]) : null;
  }
Implement an HTTPS connection by delegating to an HTTP connection for
everything but the HTTPS-specific stuff.
gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/connectors/ok/DelegatingHttpsURLConnection.java