Android的WPA / 8021X自签名证书 [英] Android WPA/8021X self signed cert
问题描述
我写一个应用程序,允许用户将Android连接到企业无线网络方便地使用PEAP或TTLS和证书。
Im writing a app to allow users to connect android to enterprise wireless networks easily using PEAP or TTLS and a cert.
我可以添加一个基于EAP WiFi配置,并得到它的wpa_supplicant连接到使用正确的凭据和证书的网络。部分得益于<一个href=\"http://stackoverflow.com/questions/4374862/how-to-programatically-create-and-read-wep-eap-wifi-configurations-in-android\">here
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.
在我安装的应用程序中使用WebVeiw打开在适当的头和证书的PHP文件的证书的那一刻,见<一href=\"http://groups.google.com/group/android-security-discuss/browse_thread/thread/0bf726de4f5275a3/391b900631d7f358\"相对=nofollow> X509头。该弹出要求用户名的证书一个certManager实例。
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.
有没有在Android?安装CA证书一个更合适的方法
从我的搜索,到目前为止,即时猜测没有。
From my searching so far, im guessing not.
推荐答案
OK,因为我张贴了这个冰淇淋三明治4.x版还推出了密钥库API中的解决方案:
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.
这篇关于Android的WPA / 8021X自签名证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!