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
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake
(OpenSSLSocketImpl.java:353)
12-11 12:46:09.426: WARN/System.err(195):     at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.getSecureSocket
(HttpConnection.java:167)
12-11 12:46:09.426: WARN/System.err(195):     at
org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection
$HttpsEngine.connect(HttpsURLConnection.java:398)
12-11 12:46:09.436: WARN/System.err(195):     at
org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection.connect
(HttpsURLConnection.java:146)
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
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:87)
12-11 12:46:09.446: WARN/System.err(195):     at
android.assistive.ws.ProblemsWS.sendForm(ProblemsWS.java:160)
12-11 12:46:09.446: WARN/System.err(195):     at
android.assistive.monitorizacion.FormularioToxicidad.run
(FormularioToxicidad.java:123)
12-11 12:46:09.446: WARN/System.err(195):     at java.lang.Thread.run
(Thread.java:935)
12-11 12:46:09.486: WARN/System.err(195): Caused by:
java.security.cert.CertificateException:
java.security.cert.CertPathValidatorException: TrustAnchor for
CertPath not found.
12-11 12:46:09.496: WARN/System.err(195):     at
org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted
(TrustManagerImpl.java:158)
12-11 12:46:09.506: WARN/System.err(195):     at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake
(OpenSSLSocketImpl.java:349)
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
org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate
(PKIXCertPathValidatorSpi.java:144)
12-11 12:46:09.546: WARN/System.err(195):     at
java.security.cert.CertPathValidator.validate(CertPathValidator.java:
153)
12-11 12:46:09.546: WARN/System.err(195):     at
org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted
(TrustManagerImpl.java:154)
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?

thanks
--~--~---------~--~----~------------~-------~--~----~



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. Question about calendar

I have just acquired a Android developer phone and I am based in
India. Here is what I see. If I enter an event on Google Calendar on
web then the reminder about the event comes 3 Hrs 30 Minutes before it
should happen. If the same event I enter on the phone then the
reminder is at the correct time.

The time zone on both (google calendar as well as phone) is set to IST
i.e. GMT+05:30. This looks like a too simple to be a bug. Has anybody
seen something similar?

--~--~---------~--~----~------------~-------~--~----~

2. How can I buy Android Dev Phone 1 鈩?in Ukraine?

Hi. Maybe somebody have any ideas?

--~--~---------~--~----~------------~-------~--~----~

3. UIQ now well out of the picture...

4. What happens to the database when app is "upgraded"

5. how to update apk's Jad file in run time

6. Is there anyway to rebuild the opencore shared library without rebuilding the whole source tree?

7. Change active AlarmManager event