我有以下的客戶端和服務器,它使用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