Sunday, September 25, 2011

Re: [android-developers] SSL Android

That's pretty much what I'm doing. I have a self-signed certificate
on this one game I built and this method works fine with that. It
doesn't matter who signed your cert (especially these days) so as long
as you're hitting an https url. It's the encryption you care about,
not the certificate authority who signed off on it.


On Thu, Sep 22, 2011 at 11:45 AM, Sivaprakash
<sivaprakashshanmugam@gmail.com> wrote:
> Hi
> I want to do a webservice call from my client app (HTTPs), With this
> following code I am able to connect and get the response successfully but
> want to know what I am doing is the correct one or not? Could some one
> review and tell me is this secured way of connecting ? I have followed steps
> which is explained
> in http://blog.synyx.de/2010/06/android-and-self-signed-ssl-certificates/
>
>         SchemeRegistry schemeRegistry = new SchemeRegistry();
>         schemeRegistry.register(new Scheme("http",
> PlainSocketFactory.getSocketFactory(), 80));
>         schemeRegistry.register(new Scheme("https", new
> EasySSLSocketFactory(), 443));
>         BasicHttpParams params = new BasicHttpParams();
>         params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 30);
>         params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE, new
> ConnPerRouteBean(30));
>         params.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false);
>         HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
>
>         ClientConnectionManager cm = new SingleClientConnManager(params,
> schemeRegistry);
>         DefaultHttpClient httpClient = new DefaultHttpClient(cm, params);
>         HttpPost request = new HttpPost(URL);
>
>
>
> --
> - Prakash.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

--
Greg Donald

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate