certificate ssl webservice keystore

by Peterman » Thu, 11 Dec 2008 19:56:59 GMT

Sponsored Links
 Hi to all

I have a problem whit the keystore that android gave us. I am
developing an application using the debug.keystore file that permit us
use maps of google (I generate the apikey, and I can see the maps
correctly). But now I have to call a webservice whit security (https)
and I have to add a certificate to my keystore (the keystore of debug
mode). I add my certificate wich permit me call to my webservice but
when I call it the emulator fails and give me the next error:

12-11 12:46:09.406: WARN/System.err(195): javax.net.ssl.SSLException:
Not trusted server certificate
12-11 12:46:09.416: WARN/System.err(195):     at
12-11 12:46:09.426: WARN/System.err(195):     at
12-11 12:46:09.426: WARN/System.err(195):     at
12-11 12:46:09.436: WARN/System.err(195):     at
12-11 12:46:09.446: WARN/System.err(195):     at
org.ksoap2.transport.ServiceConnectionSE.connect(Unknown Source)
12-11 12:46:09.446: WARN/System.err(195):     at
12-11 12:46:09.446: WARN/System.err(195):     at
12-11 12:46:09.446: WARN/System.err(195):     at
12-11 12:46:09.446: WARN/System.err(195):     at java.lang.Thread.run
12-11 12:46:09.486: WARN/System.err(195): Caused by:
java.security.cert.CertPathValidatorException: TrustAnchor for
CertPath not found.
12-11 12:46:09.496: WARN/System.err(195):     at
12-11 12:46:09.506: WARN/System.err(195):     at
12-11 12:46:09.516: WARN/System.err(195):     ... 8 more
12-11 12:46:09.516: WARN/System.err(195): Caused by:
java.security.cert.CertPathValidatorException: TrustAnchor for
CertPath not found.
12-11 12:46:09.536: WARN/System.err(195):     at
12-11 12:46:09.546: WARN/System.err(195):     at
12-11 12:46:09.546: WARN/System.err(195):     at
12-11 12:46:09.556: WARN/System.err(195):     ... 9 more

Could I do this with the keystore that android give us? Is not
possible add a certificate to this keystore?
Somebody has the same problem?


certificate ssl webservice keystore

by Michael » Fri, 12 Dec 2008 01:00:54 GMT

 Yep, join the club.  Lots of us are complaining about the inability to
add certificates to the system keystore.

One way that people have been working around this (in apps like
k9mail, for example), is to use an application-specific keystore.


Sponsored Links

certificate ssl webservice keystore

by Michael » Fri, 19 Dec 2008 23:24:16 GMT

 I second the mention of using K9 as reference.  Check in the src/com/
fsck/k9/mail/store/ directory, specifically the ImapStore.java and
TrustManagerFactory.java files, among others.

Also note that this stuff isn't Android-specific, these are standard
java.* and javax.* libraries, and there's lots of examples on the 'net
about using them.

Other Threads

1. Getting System Colours

I've seen references on how to SET system colours, but I need to find
out how you GET them - how do you find out what they are?

On the Samsung Galaxy S for example, the Tab views, the ListView
highlights, Menu Items and Summary line on the Preference Screen are
all blue.

There are many apps which immitate the style of the Preference Screen
and I want to do the same. Obviously I cannot just hard code and set
the colour to Blue, as other handsets use different colours.

The question is, is there a way to programmatically find out what
colour the Preference Screen Summary Line, Tabs, or ListView
selections are, so that you can then set that against a TextView
elsewhere in your app?

How do I get the android system colours?


2. comprehensive list of various network subtypes?

If I have something like:

mConnectivityManager= (ConnectivityManager)
NetworkInfo mActiveNetworkInfo=
Log.d(TAG, "network info -> subtype name: " +

I would get this in the logs:

"network info -> subtype name: HSDPA"

I am assuming this is something that is network-provided (here I'm on
T-Mobile US) and each carrier could have different technology types
and subsequently different values, i.e. Verizon or Sprint would have
different values altogether as they're CDMA.

Assuming the above is true, would there be a list somewhere of what
different carriers report for the subtype?  The documentation seems to
be a little sparse for this.



3. Question about android app talking to browser

4. usb camera interface

5. trying to get Hello Android tutorial to work

6. Wifi connected but Network error appears

7. Help with Fortumo in App Payments with PhoneGap