我正尝试使用asmack(Android Gingerbread)连接到Google Talk。我已经设置了connectionConfig.setTruststoreType("BKS")
- 所以我解决了证书问题。现在失败在XMPPConnection.proceedTLSReceived()
函数中,这是在服务器发送'begin'进行'starttls'请求之后调用的。(a)Smack:尝试使用XMPP登录时TLS套接字已关闭
该函数应该初始化TSL套接字。它失败,出现异常“java.net.SocketException:套接字关闭”。
// Verify certificate presented by the server
context.init(kms,
new javax.net.ssl.TrustManager[]{new ServerTrustManager(getServiceName(), config)},
//new javax.net.ssl.TrustManager[]{new OpenTrustManager()},
new java.security.SecureRandom());
Socket plain = socket;
// Secure the plain connection
socket = context.getSocketFactory().createSocket(plain, plain.getInetAddress().getHostName(), plain.getPort(), false);
socket.setSoTimeout(0); ////// THIS LINE THROWS THE EXCEPTION
任何线索?
插座被描述为:在插座 SSL套接字[ADDR = talk.google.com/173.194.70.125,端口= 5222,将localPort = 34840]
它无法在模拟器上,并在我的银河S I9000。