Are you using a commercial SSL cert vendor like VeriSign.
If not you need to either disable certficate validation or install the
trust anchor of the SSL cert.  I don't have the G1 som I only know how
to do it on the emulator.  It wasn't easy BTW since Android does not
use the standard SUN format but a BouncyCastle variant.  I did a
converter since I have so many stores in SUN format:
http://groups.google.com/group/android-developers/browse_thread/thread/1afdf215aa539ca9/6e3ec00d92eb5e32#6e3ec00d92eb5e32

Anders

On Nov 20, 11:13 am, AnuR <[EMAIL PROTECTED]> wrote:
> Hi,
>
> While I am trying to post a web page using
>
> DefaultHttpClient httpclient = new DefaultHttpClient();
> CookieStore cookies = httpclient.getCookieStore();
> HttpPost Postmethod = new HttpPost("https://urlto post");// Submiting
> I agree page
> ArrayList<BasicNameValuePair> nvpairs = new ArrayList();
> vpairs.add(new BasicNameValuePair("name1", "value1"));
> nvpairs.add(new BasicNameValuePair("name2", "value2"));
> nvpairs.add(new BasicNameValuePair("name3", "value3"));
> httpclient.setCookieStore(cookies);
> UrlEncodedFormEntity p_entityIAgree = new UrlEncodedFormEntity
> (nvpairs);
> Postmethod .setEntity(new UrlEncodedFormEntity(nvpairs, HTTP.UTF_8));
> Postmethod .setEntity(p_entityIAgree);
> ResponseHandler<String> IAgreeresponseHandler = new
> BasicResponseHandler();
>
> String IAgreeSubmitresponseBody = httpclient.execute(Postmethod ,
> IAgreeresponseHandler);
>
> I am getting an error
>
> 11-20 12:36:22.589: WARN/System.err(366): javax.net.ssl.SSLException:
> Not trusted server certificate.
>
> why is it caused ? how Can i solve it?
> _________________
--~--~---------~--~----~------------~-------~--~----~
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