我已经创建了自签名证书并配置了 tomcat 以使用它(端口 443)
当我尝试通过 j2me 应用程序访问它时,我得到 CertificateException
public void run() {
String url = "https://192.168.1.40/test/index.jsf";
try {
HttpsConnection hc = (HttpsConnection)Connector.open(url);
int respCode= hc.getResponseCode();
}catch (IOException ioe) {
Alert a = new Alert(ioe.toString(), null, AlertType.INFO);
}
javax.microedition.pki.CertificateException:证书验证失败
我认为模拟器可以选择导入证书,但是有没有办法将证书与 j2me jar 打包并使其接受真实移动设备中的自签名证书。