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. service process priority: startService() vs bindService()

Hi there,

I would need your help to clarify what is the priority
of a process hosting a Service when the service is
either started (startService() ) or bound (bindService()):

When the Service is started, the Android doc is quite clear saying:
"If the service has been started, then its hosting process is
considered to be less important than any processes that are currently
visible to the user on-screen, but more important than any process not
=> it means that the process is ranked as "Service process" level (Cf.
Processes and Threads android doc)
As far as i understand, this priority level should warrant us the
process will only be killed in a very
constraining RAM configuration, and makes it suitable for long time
running background thread..
Is my understanding correct?

My concern deals with the bound case..
Android doc says:
"If there are clients bound to the service, then the service's hosting
process is never less important than the most important client. That
is, if one of its clients is visible to the user, then the service
itself is considered to be visible. "
So if my most important client gets stopped and goes in the background
(or even worse, is destroyed), the Service process is then ranked in
the same way?? It would then mean that it does
not keep ranked as "Service process" level (started case) and will be
about to be destroyed by
the system at any time..
So what the point of launching a background thread in a bound
Service?? What's the difference between a simple thread launching from
an Activity?

Am i missing a point? Any comments?



2. Can i manipulate JavaScript events or functions in WebView ?.

thanks & regards,
G.Santhosh Kumar
+91 9966973790


3. Long server process...solution

4. My Android device is port scanning, Port 137. Anyone heard of this?

5. Google Nexus S - Secure storage

6. Creating separate versions of apps for tablets

7. bouncycastle 1.45 AES error after upgrade to Gingerbread (!?)