Thanks for the reply.  However, this brings up another issue - how
does the server reject users that dont have the appropriate keystore?
This might be a bit off topic for the Android Developers group but a
point in the right direction would be appreciated.

Would this setting to only allow specific clients with the appropriate
keystore on the server be an Apache setting?

In general, how do apps that do not require any user credentials only
allow a given app to communicate with a server and reject all others?

Thanks!

On Nov 22, 9:35 pm, Nikolay Elenkov <nikolay.elen...@gmail.com> wrote:
> Replying back to list.
>
> On Wed, Nov 23, 2011 at 1:59 AM, Mathew Goldsborough
>
> <mgoldsboro...@mg2innovations.com> wrote:
>
> > Sorry for the lack of detail.  The client would be either HttpClient
> > or HttpsURLConnection as I think both of these would accomplish my
> > goals.  However, if one has a simpler API or is easier to use when
> > using client/server certificate authentication, I'm open to using one
> > over the other.  Basically what the client is going to do is issue a
> > GET request to a specific endpoint to which the server will respond
> > with some XML. Simple enough, right?  I just want the client to be
> > authenticated via 2-way SSL certificate authentication prior to
> > receiving the response.
>
> For httpclient, the easiest way is to initialize this SocketFactory
> with your keystore, and use it create the HttpClient instance.
> You need to have your keystore as a raw resource in the apk.
> Search the list for more details, there are some examples, IIRC.
>
> http://developer.android.com/reference/org/apache/http/conn/ssl/SSLSo...
>
> For HttpsUrlConnection, the procedure is similar, initialize
> a socket factory and set it to your connection instance.
>
> http://developer.android.com/reference/javax/net/ssl/HttpsURLConnecti...

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to