| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private final JdkAlpnSslEngine. | |
| private final JdkApplicationProtocolNegotiator. |
| Access | Constructor and Description |
|---|---|
| pack-priv | JdkAlpnSslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer, BiConsumer<SSLEngine, JdkAlpnSslEngine.
Deprecated
as a consequence of
JdkApplicationProtocolNegotiator being deprecated.
|
| pack-priv | JdkAlpnSslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer)
Deprecated
as a consequence of
JdkApplicationProtocolNegotiator being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public String | getApplicationProtocol()
Returns the most recent application protocol value negotiated for this
connection.
|
| public String | getHandshakeApplicationProtocol()
Overrides javax. |
| public BiFunction | getHandshakeApplicationProtocolSelector()
Overrides javax. |
| public String | getNegotiatedApplicationProtocol()
Overrides io. Implements io. |
| public void | setHandshakeApplicationProtocolSelector(BiFunction<SSLEngine, List<String>, String>
the callback function, or null to disable the callback
functionality. selector)Overrides javax. |
| pack-priv void | setNegotiatedApplicationProtocol(String applicationProtocol)
Overrides io. |
| public SSLEngineResult | unwrap(ByteBuffer
a src, ByteBuffer ByteBuffer containing inbound network data.a dst)ByteBuffer to hold inbound application data.Overrides io. |
| public SSLEngineResult | unwrap(ByteBuffer
a src, ByteBuffer[] ByteBuffer containing inbound network data.an array of dsts)ByteBuffers to hold inbound
application data.Overrides io. |
| public SSLEngineResult | unwrap(ByteBuffer
a src, ByteBuffer[] ByteBuffer containing inbound network data.an array of dst, int ByteBuffers to hold inbound
application data.The offset within the buffer array of the first buffer from
which bytes are to be transferred; it must be non-negative
and no larger than offset, int dsts.length.The maximum number of buffers to be accessed; it must be
non-negative and no larger than
len)dsts.length - offset.Overrides io. |
| private SSLEngineResult | |
| public SSLEngineResult | wrap(ByteBuffer
a src, ByteBuffer ByteBuffer containing outbound application dataa dst)ByteBuffer to hold outbound network dataOverrides io. |
| public SSLEngineResult | wrap(ByteBuffer[]
an array of srcs, ByteBuffer ByteBuffers containing the
outbound application dataa dst)ByteBuffer to hold outbound network dataOverrides io. |
| public SSLEngineResult | wrap(ByteBuffer[]
an array of srcs, int ByteBuffers containing the
outbound application dataThe offset within the buffer array of the first buffer from
which bytes are to be retrieved; it must be non-negative
and no larger than offset, int srcs.lengthThe maximum number of buffers to be accessed; it must be
non-negative and no larger than
len, ByteBuffer srcs.length - offseta dst)ByteBuffer to hold outbound network dataOverrides io. |
| alpnSelector | back to summary |
|---|---|
| private final JdkAlpnSslEngine. | |
| selectionListener | back to summary |
|---|---|
| private final JdkApplicationProtocolNegotiator. | |
| JdkAlpnSslEngine | back to summary |
|---|---|
| pack-priv JdkAlpnSslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer, BiConsumer<SSLEngine, JdkAlpnSslEngine. Deprecated as a consequence of | |
| JdkAlpnSslEngine | back to summary |
|---|---|
| pack-priv JdkAlpnSslEngine(SSLEngine engine, JdkApplicationProtocolNegotiator applicationNegotiator, boolean isServer)
Deprecated as a consequence of | |
| getApplicationProtocol | back to summary |
|---|---|
| public String getApplicationProtocol() Overrides javax. Doc from javax. Returns the most recent application protocol value negotiated for this connection. If supported by the underlying SSL/TLS/DTLS implementation, application name negotiation mechanisms such as RFC 7301 , the Application-Layer Protocol Negotiation (ALPN), can negotiate application-level values between peers. | |
| getHandshakeApplicationProtocol | back to summary |
|---|---|
| public String getHandshakeApplicationProtocol() Overrides javax. Doc from javax. Returns the application protocol value negotiated on a SSL/TLS handshake currently in progress.
Like | |
| getHandshakeApplicationProtocolSelector | back to summary |
|---|---|
| public BiFunction Overrides javax. Doc from javax. Retrieves the callback function that selects an application protocol
value during a SSL/TLS/DTLS handshake.
See | |
| getNegotiatedApplicationProtocol | back to summary |
|---|---|
| public String getNegotiatedApplicationProtocol() Overrides io. Implements io. Doc from io. Returns the name of the negotiated application-level protocol. | |
| setHandshakeApplicationProtocolSelector | back to summary |
|---|---|
| public void setHandshakeApplicationProtocolSelector(BiFunction<SSLEngine, List<String>, String> selector) Overrides javax. Doc from javax. Registers a callback function that selects an application protocol
value for a SSL/TLS/DTLS handshake.
The function overrides any values supplied using
For example, the following call registers a callback function that examines the TLS handshake parameters and selects an application protocol name:
| |
| setNegotiatedApplicationProtocol | back to summary |
|---|---|
| pack-priv void setNegotiatedApplicationProtocol(String applicationProtocol) Overrides io.
| |
| unwrap | back to summary |
|---|---|
| public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer dst) throws SSLException Overrides io. Doc from javax. Attempts to decode SSL/TLS/DTLS network data into a plaintext application data buffer. An invocation of this method behaves in exactly the same manner as the invocation:
| |
| unwrap | back to summary |
|---|---|
| public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer[] dsts) throws SSLException Overrides io. Doc from javax. Attempts to decode SSL/TLS/DTLS network data into a sequence of plaintext application data buffers. An invocation of this method behaves in exactly the same manner as the invocation:
| |
| unwrap | back to summary |
|---|---|
| public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer[] dst, int offset, int len) throws SSLException Overrides io. Doc from javax. Attempts to decode SSL/TLS/DTLS network data into a subsequence of
plaintext application data buffers. This "scattering"
operation decodes, in a single invocation, a sequence of bytes
into one or more of a given sequence of buffers. Scattering
unwraps are often useful when implementing network protocols or
file formats that, for example, group data into segments
consisting of one or more fixed-length headers followed by a
variable-length body. See
Depending on the state of the SSLEngine, this method may consume network data without producing any application data (for example, it may consume handshake data.) The application is responsible for reliably obtaining the network data from the peer, and for invoking unwrap() on the data in the order it was received. The application must properly synchronize multiple calls to this method.
If this
This method will attempt to consume one complete SSL/TLS/DTLS network
packet, but will never consume more than the sum of the bytes
remaining in the buffers. Each
The underlying memory used by the
The inbound network buffer, Note the network data will not be useful to a second SSLEngine, as each SSLEngine contains unique random state which influences the SSL/TLS/DTLS messages. See the class description for more information on engine closure.
| |
| verifyProtocolSelection | back to summary |
|---|---|
| private SSLEngineResult verifyProtocolSelection(SSLEngineResult result) throws SSLException | |
| wrap | back to summary |
|---|---|
| public SSLEngineResult wrap(ByteBuffer src, ByteBuffer dst) throws SSLException Overrides io. Doc from javax. Attempts to encode a buffer of plaintext application data into SSL/TLS/DTLS network data. An invocation of this method behaves in exactly the same manner as the invocation:
| |
| wrap | back to summary |
|---|---|
| public SSLEngineResult wrap(ByteBuffer[] srcs, ByteBuffer dst) throws SSLException Overrides io. Doc from javax. Attempts to encode plaintext bytes from a sequence of data buffers into SSL/TLS/DTLS network data. An invocation of this method behaves in exactly the same manner as the invocation:
| |
| wrap | back to summary |
|---|---|
| public SSLEngineResult wrap(ByteBuffer[] srcs, int offset, int len, ByteBuffer dst) throws SSLException Overrides io. Doc from javax. Attempts to encode plaintext bytes from a subsequence of data
buffers into SSL/TLS/DTLS network data. This "gathering"
operation encodes, in a single invocation, a sequence of bytes
from one or more of a given sequence of buffers. Gathering
wraps are often useful when implementing network protocols or
file formats that, for example, group data into segments
consisting of one or more fixed-length headers followed by a
variable-length body. See
Depending on the state of the SSLEngine, this method may produce network data without consuming any application data (for example, it may generate handshake data.) The application is responsible for reliably transporting the network data to the peer, and for ensuring that data created by multiple calls to wrap() is transported in the same order in which it was generated. The application must properly synchronize multiple calls to this method.
If this
This method will attempt to produce SSL/TLS/DTLS records, and will
consume as much source data as possible, but will never consume
more than the sum of the bytes remaining in each buffer. Each
The underlying memory used by the See the class description for more information on engine closure.
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final JdkApplicationProtocolNegotiator. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public String | apply(SSLEngine
the first function argument sslEngine, List<String> the second function argument strings)Implements java. |
| pack-priv void |
| called | back to summary |
|---|---|
| private boolean called | |
| selector | back to summary |
|---|---|
| private final JdkApplicationProtocolNegotiator. | |
| AlpnSelector | back to summary |
|---|---|
| pack-priv AlpnSelector(JdkApplicationProtocolNegotiator. | |
| apply | back to summary |
|---|---|
| public String apply(SSLEngine sslEngine, List<String> strings) Implements java. Doc from java. Applies this function to the given arguments. | |
| checkUnsupported | back to summary |
|---|---|
| pack-priv void checkUnsupported() | |