I would appreciate anyone's input on this it is driving me crazy.

Basically, we are accessing a host that has personal cert installed
over https. In the sample code bellow everything works just fine until
I uncomment the commented line. Once I do that I get 
"Peer not verified" exception. 



public SmapleTestCraft() throws Exception {
        CertificateManager certManager = CertificateManager.getInstance();
        ProtocolSocketFactory sf = new
AuthSSLProtocolSocketFactory(certManager);;
        
        Protocol.registerProtocol("https", new Protocol("https", sf, 443));
        
        MultiThreadedHttpConnectionManager connectionManager = new
MultiThreadedHttpConnectionManager();
        // THIS LINE BREAKS EVERYTHING, BUT WE NEED TIMEOUT VALUE
        //connectionManager.getParams().setConnectionTimeout(5000);
        
        HttpClient httpclient = new HttpClient(connectionManager);
 
httpclient.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
        
        GetMethod httpget = new GetMethod("https://127.0.0.1/banner.txt";);
        
        try {
            httpclient.executeMethod(httpget);
            System.out.println(httpget.getStatusLine());
        } finally {
            httpget.releaseConnection();
        }
    }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to