It's possible.  I found it rather difficult.  I use a specialized
client, to get a port that contains the SSL settings.

class SpecializedClient extends GeneratedClient
{
    @Override
    public Object getEndpoint(Endpoint endpoint)
    {
        Object port = super.getEndpoint(endpoint);
        Client client = Client.getInstance(port);
        if (client != null) {
            Channel channel = client.getOutChannel();
            if (channel instanceof HttpChannel) {
                ((HttpChannel) channel).setProperty
                   (CommonsHttpMessageSender.HTTP_CLIENT, httpClient);
            }
        }
        return port;
    }

httpClient is an org.apache.commons.httpclient.HttpClient that contains
a specialized HostConfiguration, similar to
org.apache.commons.httpclient.contrib.ssl.HostConfigurationWithHostFacto
ry, which contains the SSL settings.

This requires Commons HTTP Client version 3.1-rc1 or later; specifically
the fix for http://issues.apache.org/jira/browse/HTTPCLIENT-634

Adding XFire Client properties for all the parameters of the Commons
HTTP Client seems like a bad idea, since the parameters are numerous,
structured and evolving.

- John Kristian

-----Original Message-----
From: lucheng [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 03, 2007 11:53 AM
To: [email protected]
Subject: Re: [xfire-user] unique SSL setting per connection

Since x-fire uses apache http client is it possible to expose the client
setting for unique SSL settings (keystores, key types) per connection
just
like how it's done with tcp timeout value?

lucheng wrote:
> 
> I have read the user guide and the secton on HTTP / Transport but I am
> not clear on how to set SSL settings per client connection instead of
> registering a customSSLProtocol which sets the same keys for all https
> connection.
> 
> Currently I am setting the global SSL properties through
> System.setProperty (i.e. javax.net.ssl.keyStore,
> javax.net.ssl.keyStorePassword, etc) which is not what I needed.
> 
> Is there a way to set the individual SSL properties for each client
> connection just like how we can set unique timeout value for each
> connection (i.e. client.setProperty)?
> 
> Thanks.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to