2

Im writing a app to allow users to connect android to enterprise wireless networks easily using PEAP or TTLS and a cert.

I can add a EAP based wifi profile and get it to connect wpa_supplicant to the network using the correct credentials and cert. Partially thanks to here

The installation of a cert is proving difficult though.

At the moment i am installing the cert using WebVeiw in the app to open a php file with the appropriate header and cert in. See x509 header. This bring up a certManager instance which requires the user name the cert.

Is there a neater way to install a CA cert on android?

From my searching so far, im guessing not.

Community
  • 1
  • 1
GarethAyres
  • 106
  • 6

1 Answers1

0

OK since i posted this Ice Cream Sandwich 4.x has come out with a solution in the KeyStore API:

enter code here
Certificate cert = null;
//some code to get the cert
Intent intent = new Intent("android.credentials.INSTALL");
intent.putExtra("name", "Swansea Uni WiFi Cert");
try {
intent.putExtra("CERT",cert.getEncoded());
} 
catch (CertificateEncodingException e)
{
e.printStackTrace();
SU1X.debug("error on cert install");
}
startActivityForResult(intent,0);

Thought i would just update this in case anyone else is trying to do the same thing and found this question.

GarethAyres
  • 106
  • 6