List of usage examples for javax.net.ssl SSLEngine getPeerHost
public String getPeerHost()
From source file:mitm.BouncyCastleSslEngineSource.java
private void filterWeakCipherSuites(SSLEngine sslEngine) { List<String> ciphers = new LinkedList<String>(); for (String each : sslEngine.getEnabledCipherSuites()) { if (each.equals(each.equals("TLS_DHE_RSA_WITH_AES_128_CBC_SHA") || each.equals("TLS_DHE_RSA_WITH_AES_256_CBC_SHA"))) { LOG.debug("Removed cipher {}", each); } else {/*w w w. j ava2s. co m*/ ciphers.add(each); } } sslEngine.setEnabledCipherSuites(ciphers.toArray(new String[ciphers.size()])); if (LOG.isDebugEnabled()) { if (sslEngine.getUseClientMode()) { LOG.debug("Enabled server cipher suites:"); } else { String host = sslEngine.getPeerHost(); int port = sslEngine.getPeerPort(); LOG.debug("Enabled client {}:{} cipher suites:", host, port); } for (String each : ciphers) { LOG.debug(each); } } }