android - Title : self signing server certificate -


i need use “https:\ “ post web service in android application getting error “non trusted server certificate” .

is there solution ???

following code .

public static string callservice() {            string response = "";            hashmap<string, string> valuemap = new hashmap<string, string>();            valuemap.put("name", "nandlal");          valuemap.put("date_of_birth", "12-01-1986");          valuemap.put("gender", "women");          valuemap.put("user_name", "nandlal80.840947");          valuemap.put("confirm_password", "qqqq");          valuemap.put("email", nandlal@dignizant.com);          valuemap.put("confirm_email", "nandlal@dignizant.com");          valuemap.put("co_address", "surat");          valuemap.put("address_information", "surat");          valuemap.put("postcode", "45454");          valuemap.put("country", "india");          valuemap.put("town", "surat");          valuemap.put("doorcode", "800");          valuemap.put("language", "english");          valuemap.put("telephone_home", "840947");          valuemap.put("telephone_work", "866");          valuemap.put("cellphone", "56656");          valuemap.put("skype_name", "myskype");            httprequest httprequest = new httprequest();            try {                  response = httprequest                            .dopost("https://www.buzzador.com/apps/present_software/webservice/index.php?op=registration1",                                        valuemap);                  system.out.println("responce :" + response);            } catch (exception e) {                // todo auto-generated catch block                e.printstacktrace();                system.out.println("error :" + e.tostring());                response = e.tostring();          }          return response;      } 

since certificate self-signed, not trusted android default trust manager. can follow bob lee tutorial android: trusting ssl certificates aiming trust server certificate in application:


Comments