-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add support for self signed certificates #3
Comments
Fixed with: Ion.getDefault(getContext()).getHttpClient().getSSLSocketMiddleware().setTrustManagers(...);
Ion.getDefault(getContext()).getHttpClient().getSSLSocketMiddleware().setSSLContext(...); Fix was in AndroidAsync: |
This test case is also a good sample: |
Excuse me for asking, |
It's an implementation to trust a specific cert. |
But it doesn't load a specific CA from file, or somewhere, like in here http://developer.android.com/training/articles/security-ssl.html#UnknownCa, so how does it trust from specific cert? |
It does exactly that: koush/AndroidAsync@968638d#diff-f1b421e2e337ad983791aaef62f7de28R33 See the bit where it sets up it's own trust manager and loads a self signed cert. |
Oh, shit. I realized that I misread second comment (or first) this whole time. |
Is there maybe a simple example showing how to use this when using Ion to connect to a RESTful server using self signed certificates? |
As |
EDIT
( Ion.getDefault(c) is used in Ion.with{}) |
ion uses the same http client every call. |
@koush yes, but as the examples setup
and Ion.getDefault(c) is on
the example code does not match the usage of Ion.with .. |
ion.with calls into ion.getDefault. |
oh, you were assuming that ion uses the default asynchttpclient. nah, it has it's own. |
Is there a reason |
i use Cloudflare Free SSL and getting Error |
for future reference : https://gist.github.com/muhammad-naderi/fad2c163ac61e0b7282209c07f5dadf5 |
Need support for custom SSL Context and TrustManagers for use during SSL handshaking.
The text was updated successfully, but these errors were encountered: