我有以下的客户端和服务器,它使用SSL:ssl是必需的密钥库和信任库吗?
客户端代码(桌面):
SSLSocket socket= (SSLSocket)sslsf.createSocket(ip,Constants.CHAT_SERVER_PORT);
final String[] enabledCipherSuites = socket.getSupportedCipherSuites();
socket.setEnabledCipherSuites(enabledCipherSuites);
服务器代码(安卓):
SSLServerSocket ss=(SSLServerSocket)sslssf.createServerSocket(Constants.CHAT_SERVER_PORT);
final String[] enabledCipherSuites = ss.getSupportedCipherSuites();
ss.setEnabledCipherSuites(enabledCipherSuites);
while(true){
Socket s=ss.accept();
}
我使用他们不信任和密钥库。他们是强制性的?
看到这个职位,我只是举了一个例子,以建立一个没有任何HTTPS连接(使用默认值) :http://stackoverflow.com/questions/16504527/android-https-post-how-to-do/16507195?noredirect=1#comment23697931_16507195 – tbkn23 2013-05-12 14:06:31