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

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

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

SSLSocketFactory.prepareSocket介绍

[英]Performs any custom initialization for a newly created SSLSocket (before the SSL handshake happens). The default implementation is a no-op, but could be overridden to, e.g., call SSLSocket#setEnabledCipherSuites(java.lang.String[]).
[中]为新创建的SSLSocket执行任何自定义初始化(在SSL握手发生之前)。默认实现是no-op,但可以重写为,例如,调用SSLSocket#setenablediphersuites(java.lang.String[])。

代码示例

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

private void internalPrepareSocket(final SSLSocket socket) throws IOException {
  if (supportedProtocols != null) {
    socket.setEnabledProtocols(supportedProtocols);
  }
  if (supportedCipherSuites != null) {
    socket.setEnabledCipherSuites(supportedCipherSuites);
  }
  prepareSocket(socket);
}

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

private void internalPrepareSocket(final SSLSocket socket) throws IOException {
  if (supportedProtocols != null) {
    socket.setEnabledProtocols(supportedProtocols);
  }
  if (supportedCipherSuites != null) {
    socket.setEnabledCipherSuites(supportedCipherSuites);
  }
  prepareSocket(socket);
}

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

private void internalPrepareSocket(final SSLSocket socket) throws IOException {
  if (supportedProtocols != null) {
    socket.setEnabledProtocols(supportedProtocols);
  }
  if (supportedCipherSuites != null) {
    socket.setEnabledCipherSuites(supportedCipherSuites);
  }
  prepareSocket(socket);
}

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

private void internalPrepareSocket(final SSLSocket socket) throws IOException {
  if (supportedProtocols != null) {
    socket.setEnabledProtocols(supportedProtocols);
  }
  if (supportedCipherSuites != null) {
    socket.setEnabledCipherSuites(supportedCipherSuites);
  }
  prepareSocket(socket);
}

代码示例来源:origin: org.eclipse.aether/aether-transport-http

@Override
protected void prepareSocket( SSLSocket socket )
  throws IOException
{
  super.prepareSocket( socket );
  if ( cipherSuites != null )
  {
    socket.setEnabledCipherSuites( cipherSuites );
  }
  if ( protocols != null )
  {
    socket.setEnabledProtocols( protocols );
  }
}

相关文章