I attempt to connect to my web-site with a self-signed certificate. I
received a SSLException ("Not trusted server certificate") because my
website doesn't have a trust certificate.

So I try to connect to others safe-web-pages witch has certificates
signed by CA authorities like Verisign, Thawte, GoDaddy, Digicert,
etc. I noticed that the request sometimes throws the exception and
sometimes not.

I want to purchase a CA-signed certificated, but I don't know what
requirements takes Android when decides the truthfulness of the
certificates.

Does somebody can help me?

Thanks in advance.
Yonatan Romero

The stacktrace is here when attempt to connect
https://ebankpersonas.bancopatagonia.com.ar/eBanking/usuarios/login.htm
:

 02-06 17:06:21.216: W/System.err(3698): javax.net.ssl.SSLException:
Not trusted server certificate
02-06 17:06:21.247: W/System.err(3698):         at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:
360)
02-06 17:06:21.256: W/System.err(3698):         at
org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:
92)
02-06 17:06:21.266: W/System.err(3698):         at
org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:
321)
02-06 17:06:21.276: W/System.err(3698):         at
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:
129)
02-06 17:06:21.287: W/System.err(3698):         at
org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:
164)
02-06 17:06:21.299: W/System.err(3698):         at
org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:
119)
02-06 17:06:21.306: W/System.err(3698):         at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:
348)
02-06 17:06:21.318: W/System.err(3698):         at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:
555)
02-06 17:06:21.327: W/System.err(3698):         at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:
487)
02-06 17:06:21.336: W/System.err(3698):         at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:
465)
02-06 17:06:21.346: W/System.err(3698):         at
ar.com.firstsystems.example.https.BasicHttpClient.connect(BasicHttpClient.java:
41)
02-06 17:06:21.356: W/System.err(3698):         at
ar.com.firstsystems.example.android.service.UpdateService.checkNewUpdates(UpdateService.java:
40)
02-06 17:06:21.366: W/System.err(3698):         at
ar.com.firstsystems.example.android.service.UpdateService.onCreate(UpdateService.java:
25)
02-06 17:06:21.376: W/System.err(3698):         at
android.app.ActivityThread.handleCreateService(ActivityThread.java:
2780)
02-06 17:06:21.386: W/System.err(3698):         at
android.app.ActivityThread.access$3200(ActivityThread.java:119)
02-06 17:06:21.396: W/System.err(3698):         at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1917)
02-06 17:06:21.396: W/System.err(3698):         at
android.os.Handler.dispatchMessage(Handler.java:99)
02-06 17:06:21.406: W/System.err(3698):         at
android.os.Looper.loop(Looper.java:123)
02-06 17:06:21.416: W/System.err(3698):         at
android.app.ActivityThread.main(ActivityThread.java:4363)
02-06 17:06:21.429: W/System.err(3698):         at
java.lang.reflect.Method.invokeNative(Native Method)
02-06 17:06:21.436: W/System.err(3698):         at
java.lang.reflect.Method.invoke(Method.java:521)
02-06 17:06:21.449: W/System.err(3698):         at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
02-06 17:06:21.476: W/System.err(3698):         at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
02-06 17:06:21.496: W/System.err(3698):         at
dalvik.system.NativeStart.main(Native Method)
02-06 17:06:21.506: W/System.err(3698): Caused by:
java.security.cert.CertificateException:
java.security.cert.CertPathValidatorException: TrustAnchor for
CertPath not found.
02-06 17:06:21.566: W/System.err(3698):         at
org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:
168)
02-06 17:06:21.606: W/System.err(3698):         at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:
355)
02-06 17:06:21.619: W/System.err(3698):         ... 23 more
02-06 17:06:21.627: W/System.err(3698): Caused by:
java.security.cert.CertPathValidatorException: TrustAnchor for
CertPath not found.
02-06 17:06:21.656: W/System.err(3698):         at
org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:
149)
02-06 17:06:21.676: W/System.err(3698):         at
java.security.cert.CertPathValidator.validate(CertPathValidator.java:
211)
02-06 17:06:21.686: W/System.err(3698):         at
org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:
164)
02-06 17:06:21.696: W/System.err(3698):         ... 24 more

-- 
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