Package org.apache.hc.client5.http.ssl
Interface TlsSocketStrategy
-
- All Known Implementing Classes:
AbstractClientTlsStrategy,DefaultClientTlsStrategy,SpkiPinningClientTlsStrategy
@Contract(threading=STATELESS) public interface TlsSocketStrategyTLS protocol upgrade strategy for blockingSockets.- Since:
- 5.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.net.ssl.SSLSocketupgrade(java.net.Socket socket, java.lang.String target, int port, java.lang.Object attachment, org.apache.hc.core5.http.protocol.HttpContext context)Upgrades the given plain socket and executes the TLS handshake over it.
-
-
-
Method Detail
-
upgrade
javax.net.ssl.SSLSocket upgrade(java.net.Socket socket, java.lang.String target, int port, java.lang.Object attachment, org.apache.hc.core5.http.protocol.HttpContext context) throws java.io.IOExceptionUpgrades the given plain socket and executes the TLS handshake over it.- Parameters:
socket- the existing plain sockettarget- the name of the target host.port- the port to connect to on the target host.context- the actual HTTP context.attachment- connect request attachment.- Returns:
- socket upgraded to TLS.
- Throws:
java.io.IOException
-
-