org.apache.http.conn.ssl.SSLSocketFactory.verifyHostname()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(251)

本文整理了Java中org.apache.http.conn.ssl.SSLSocketFactory.verifyHostname()方法的一些代码示例,展示了SSLSocketFactory.verifyHostname()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SSLSocketFactory.verifyHostname()方法的具体详情如下:
包路径:org.apache.http.conn.ssl.SSLSocketFactory
类名称:SSLSocketFactory
方法名:verifyHostname

SSLSocketFactory.verifyHostname介绍

暂无

代码示例

代码示例来源:origin: com.hynnet/httpclient

public Socket createLayeredSocket(
    final Socket socket,
    final String target,
    final int port,
    final HttpContext context) throws IOException {
  final SSLSocket sslsock = (SSLSocket) this.socketfactory.createSocket(
      socket,
      target,
      port,
      true);
  internalPrepareSocket(sslsock);
  sslsock.startHandshake();
  verifyHostname(sslsock, target);
  return sslsock;
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient

public Socket createLayeredSocket(
    final Socket socket,
    final String target,
    final int port,
    final HttpContext context) throws IOException {
  final SSLSocket sslsock = (SSLSocket) this.socketfactory.createSocket(
      socket,
      target,
      port,
      true);
  internalPrepareSocket(sslsock);
  sslsock.startHandshake();
  verifyHostname(sslsock, target);
  return sslsock;
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

@Override
public Socket createLayeredSocket(
    final Socket socket,
    final String target,
    final int port,
    final HttpContext context) throws IOException {
  final SSLSocket sslsock = (SSLSocket) this.socketfactory.createSocket(
      socket,
      target,
      port,
      true);
  internalPrepareSocket(sslsock);
  sslsock.startHandshake();
  verifyHostname(sslsock, target);
  return sslsock;
}

代码示例来源:origin: Nextdoor/bender

@Override
public Socket createLayeredSocket(
    final Socket socket,
    final String target,
    final int port,
    final HttpContext context) throws IOException {
  final SSLSocket sslsock = (SSLSocket) this.socketfactory.createSocket(
      socket,
      target,
      port,
      true);
  internalPrepareSocket(sslsock);
  sslsock.startHandshake();
  verifyHostname(sslsock, target);
  return sslsock;
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient

final SSLSocket sslsock = (SSLSocket) sock;
  sslsock.startHandshake();
  verifyHostname(sslsock, host.getHostName());
  return sock;
} else {

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

final SSLSocket sslsock = (SSLSocket) sock;
  sslsock.startHandshake();
  verifyHostname(sslsock, host.getHostName());
  return sock;
} else {

代码示例来源:origin: com.hynnet/httpclient

final SSLSocket sslsock = (SSLSocket) sock;
  sslsock.startHandshake();
  verifyHostname(sslsock, host.getHostName());
  return sock;
} else {

代码示例来源:origin: Nextdoor/bender

final SSLSocket sslsock = (SSLSocket) sock;
  sslsock.startHandshake();
  verifyHostname(sslsock, host.getHostName());
  return sock;
} else {

相关文章