예제 #1
0
 private static void printSocketInfo(SSLSocket s) {
   LOGGER.info("Socket class: " + s.getClass());
   LOGGER.info("   Remote address = " + s.getInetAddress().toString());
   LOGGER.info("   Remote port = " + s.getPort());
   LOGGER.info("   Local socket address = " + s.getLocalSocketAddress().toString());
   LOGGER.info("   Local address = " + s.getLocalAddress().toString());
   LOGGER.info("   Local port = " + s.getLocalPort());
   LOGGER.info("   Need client authentication = " + s.getNeedClientAuth());
   SSLSession ss = s.getSession();
   LOGGER.info("   Cipher suite = " + ss.getCipherSuite());
   LOGGER.info("   Protocol = " + ss.getProtocol());
 }
예제 #2
0
 public static void logOutConnection(SSLSocket soc, String localId)
     throws SSLPeerUnverifiedException, CertificateException {
   String peerCN = getSubjectFromPrinciple(soc.getSession().getPeerPrincipal());
   _log.info(
       "From: "
           + localId
           + " : "
           + soc.getInetAddress().toString()
           + ":"
           + soc.getPort()
           + "\n"
           + "To  : "
           + peerCN
           + " : "
           + soc.getLocalAddress().toString()
           + ":"
           + soc.getLocalPort());
 }
 public int getPort() {
   return delegate.getPort();
 }