throws IOException
    public void customize(EndPoint endpoint, Request request)    {        super.customize(endpoint, request);        request.setScheme(HttpSchemes.HTTPS);                SocketEndPoint socket_end_point = (SocketEndPoint)endpoint;        SSLSocket sslSocket = (SSLSocket)socket_end_point.getConnection();                try        {            SSLSession sslSession = sslSocket.getSession();            String cipherSuite = sslSession.getCipherSuite();            Integer keySize;            X509Certificate[] certs;            CachedInfo cachedInfo = (CachedInfo) sslSession.getValue(CACHED_INFO_ATTR);            if (cachedInfo != null)            {                keySize = cachedInfo.getKeySize();                certs = cachedInfo.getCerts();            }            else            {                keySize = new Integer(ServletSSL.deduceKeyLength(cipherSuite));                certs = getCertChain(sslSession);                cachedInfo = new CachedInfo(keySize, certs);                sslSession.putValue(CACHED_INFO_ATTR, cachedInfo);            }            if (certs != null)                request.setAttribute("javax.servlet.request.X509Certificate", certs);            else if (_needClientAuth) // Sanity check                throw new IllegalStateException("no client auth");            request.setAttribute("javax.servlet.request.cipher_suite", cipherSuite);            request.setAttribute("javax.servlet.request.key_size", keySize);        }        catch (Exception e)        {            Log.warn(Log.EXCEPTION, e);        }    }