コード例 #1
0
ファイル: SimpleRawTcpClient.java プロジェクト: thejeed/jpaw
 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
ファイル: Utility.java プロジェクト: weicz/cpkcrypto
 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());
 }
コード例 #3
0
 public int getLocalPort() {
   return delegate.getLocalPort();
 }