@Override
            public void handle(String target, Request baseRequest, HttpServletRequest request,
                HttpServletResponse response) throws IOException, ServletException {

                Enumeration<String> z = request.getAttributeNames();

                while (z.hasMoreElements()) {
                    String elem = z.nextElement();
                    System.out.println(elem + " - " + request.getAttribute(elem));
                }

                if (request.getAttribute("javax.servlet.request.X509Certificate") != null) {
                    clientSerial = ((java.security.cert.X509Certificate[]) request
                        .getAttribute("javax.servlet.request.X509Certificate"))[0].getSerialNumber();
                }

                response.setStatus(HttpServletResponse.SC_OK);
                baseRequest.setHandled(true);
                response.getWriter().println("apiman");
            }
With thanks to assistance of http://stackoverflow.com/b/20056601/2766538
@throws Exception any exception
gateway/platforms/servlet/src/test/java/io/apiman/gateway/platforms/servlet/auth/tls/AliasedCertTest.java