Hi Oleg,

good point - it does seem to be working - I am connecting to just one
host, and have defaultMaxPerRoute and maxTotal set to 4.
My other question on being notified when the sockets connected etc.
was to prove this to myself, seeing as I'm unable to get logging
working in my particular situation. I extended SSLSocketFactory and
put some debugging in createSocket, connectSocket() and
handshakeCompleted().  I usually only see this set of 3 calls 4 times.
I just wanted to verify that there wasn't some extra step needed
regarding SSL session caching.

If e.g. I put the device in airplane mode and then restore
connectivity, it will have to create the TCP connections anew, but
will it re-use the cached SSL credentials?

Thanks a lot
John.


On Thu, Nov 1, 2012 at 3:20 AM, Oleg Kalnichevski <[email protected]> wrote:
> On Wed, Oct 31, 2012 at 05:02:39PM -0700, John Sheehy wrote:
>> Hi all,
>>
>> if there are any Android users out there, does anyone know if there is
>> a need to explicitly provide an SSL session cache with HttpClient 4.2
>> in order to avoid TLS negotiation with every new TCP connection ?
>>
>> I've got a repackaged 4.2 (some 4.0.x version is built-into android
>> and that hogs the org.apache namespace, hence the repackaging), and
>> I'm finding it very difficult to get the connection/context logs to be
>> visible.
>>
>> Something like the following perhaps?
>>
>>
>> SSLSessionCache sessionCache = new SSLSessionCache(context);
>>
>> schemeRegistry.register(new Scheme("https",
>>         SSLCertificateSocketFactory.getHttpSocketFactory(
>>         SOCKET_OPERATION_TIMEOUT, sessionCache), 443));
>>
>>
>> Thanks,
>>
>> John.
>>
>
> John
>
> Do you know if SSL connections get re-used for consecutive requests or new 
> connection gets created for each individual request? You might want to fix 
> the connection re-use problem first, if the latter is the case.
>
> Oleg
>
>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to