Skip to content

Optional passing of SSLSocketFactory #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Optional passing of SSLSocketFactory #2

wants to merge 1 commit into from

Conversation

alif
Copy link

@alif alif commented Jun 3, 2011

I thought it might be helpful to add support for passing in an SSLSocketFactory to the AsyncHttpClient constructor. I was able to create a custom SSLSocketFactory that handles my trusted certs and pass it in without having to do too much to your existing code.

BTW - This lib is awesome! Saved me a bit of time from writing this all from scratch.

@loopj
Copy link
Collaborator

loopj commented Jun 3, 2011

hey, thanks alif! I'll take a look at this soon.

which app are you using the library in?

Thanks
-James

On Thu, Jun 2, 2011 at 11:05 PM, alif <
reply@reply.github.com>wrote:

I thought it might be helpful to add support for passing in an
SSLSocketFactory to the AsyncHttpClient constructor. I was able to create a
custom SSLSocketFactory that handles my trusted certs and pass it in without
having to do too much to your existing code.

BTW - This lib is awesome! Saved me a bit of time from writing this all
from scratch.

Reply to this email directly or view it on GitHub:
#2

@alif
Copy link
Author

alif commented Jun 3, 2011

It's for an app I'm working on that isn't in the market yet. Hopefully soon it will be though.

@alif alif closed this Jun 3, 2011
@alif alif reopened this Jun 3, 2011
@alif
Copy link
Author

alif commented Jun 3, 2011

Didn't mean to close :\

@loopj
Copy link
Collaborator

loopj commented Jun 5, 2011

Hey alif, thanks for the inspiration! I've updated the library so you can now set the sslsocketfactory after constructing the http client:

http://loopj.com/android-async-http/doc/com/loopj/android/http/AsyncHttpClient.html#setSSLSocketFactory(org.apache.http.conn.ssl.SSLSocketFactory)

for example:

AsyncHttpClient client = new AsyncHttpClient();
client.setSSLSocketFactory(mySocketFactory);

I refactored some of the client initialization logic so I threw this in too.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants