Following the recommendation from this thread:
http://markmail.org/message/2do7hlyw6ka4dat2#query:android%20HttpsUrlConnection+page:2+mid:slnqe4wtk6k77e3r+state:results

I have placed some modified jars here:
http://www.shanaghy.com/gdatamod/


I modified the gdata source to override the https cert verifier in the
following places.
com\google\gdata\client\GoogleAuthTokenFactory.java(461):
HttpURLConnection urlConnection = (HttpURLConnection)
url.openConnection();
com\google\gdata\client\authn\oauth\OAuthHttpClient.java(43):
HttpURLConnection connection = (HttpURLConnection)
url.openConnection();
com\google\gdata\client\http\AuthSubUtil.java(303): HttpURLConnection
httpConn = (HttpURLConnection) url.openConnection();
com\google\gdata\client\http\AuthSubUtil.java(371): HttpURLConnection
httpConn = (HttpURLConnection) url.openConnection();
com\google\gdata\client\http\AuthSubUtil.java(431): HttpURLConnection
httpConn = (HttpURLConnection) url.openConnection();
com\google\gdata\client\http\HttpGDataRequest.java(320):
HttpURLConnection uc = (HttpURLConnection)
requestUrl.openConnection();


The modified code looks like this:

    // Open connection
    HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
    if ( urlConnection instanceof HttpsURLConnection ) {
        HttpsURLConnection ucs = (HttpsURLConnection) urlConnection;
        ucs.setHostnameVerifier( new X509HostnameVerifier(){
            @Override
            public boolean verify(String arg0, SSLSession arg1) {
                return true;
            }
            @Override
            public void verify(String arg0, SSLSocket arg1) throws IOException {
            }
            @Override
            public void verify(String arg0, X509Certificate arg1)
throws SSLException {
            }
            @Override
            public void verify(String arg0, String[] arg1, String[]
arg2) throws SSLException {
            }
        });
    }


I have only tested this using PicasawebService.setUserCredentials and
it passed the verification step without any problems.

I have not tested this extensively and do not plan to maintain it.
If you wish to use it do so at your own leisure/risk   ;-P





On Tue, Nov 18, 2008 at 1:44 AM, Waldo <[EMAIL PROTECTED]> wrote:
>
> I'm having the same problem.  Apparently lots of people are, judging
> from searches I've done...
>
> W
>
> On Nov 3, 7:35 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > Hello. I'm from Belgium, so, sorry for my english ;-)
> >
> > I'm developing an application withgdataAPI.
> >
> > I tried :
> > PicasawebService myService = new PicasawebService("exampleCo-
> > exampleApp-1");                    myService.setUserCredentials("[EMAIL 
> > PROTECTED]",
> > "password");
> >
> > it works fine on an J2SE application but there is an error with
> > Android :
> >
> > com.google.gdata.util.AuthenticationException: Error connecting with
> > login URI
> >
> > I put the INTERNET permission in manifest file but it doesn't works
> >
> > Can anybody help me ?
> >
> > thanks
> >
> > Julien
> >

--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to