2017-05-06 11 views

答えて

0

はそれを手に入れた:

ListenerFactory factory = new ListenerFactory(); 
    SslConfigurationFactory ssl = new SslConfigurationFactory(); 
    ssl.setClientAuthentication("true"); 
    ssl.setTruststoreFile(new File("trust.jks")); 
    ssl.setTruststorePassword("trust-password"); 
    ssl.setKeystoreFile(new File("certs.jks")); 
    ssl.setKeystorePassword("certs-password"); 
    factory.setSslConfiguration(ssl.createSslConfiguration()); 
    factory.setImplicitSsl(true); 

サーバが証明書を使用して接続するようにクライアントを強制されます、とだけtrust.jksに含まれるものを受け入れます。

関連する問題