Top Description Inners Fields Constructors Methods
io.netty5.handler.ssl

pack-priv abstract Class ConscryptAlpnSslEngine

extends JdkSslEngine
implements VectoredUnwrap
Class Inheritance
All Implemented Interfaces
io.netty5.handler.ssl.VectoredUnwrap
Known Direct Subclasses
io.netty5.handler.ssl.ConscryptAlpnSslEngine.ClientEngine, io.netty5.handler.ssl.ConscryptAlpnSslEngine.ServerEngine
Imports
io.netty5.buffer.Buffer, .DefaultBufferAllocators, .StandardAllocationTypes, io.netty5.handler.ssl.JdkApplicationProtocolNegotiator.ProtocolSelectionListener, .JdkApplicationProtocolNegotiator.ProtocolSelector, io.netty5.util.internal.EmptyArrays, .SystemPropertyUtil, org.conscrypt.AllocatedBuffer, .BufferAllocator, .Conscrypt, .HandshakeListener, javax.net.ssl.SSLEngine, .SSLEngineResult, .SSLException, java.nio.ByteBuffer, java.util.Collections, .LinkedHashSet, .List

A JdkSslEngine that uses the Conscrypt provider or SSL with ALPN.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv final int

Returns:

the maximum size of the encrypted output buffer required for the wrap operation.
calculateOutNetBufSize
(int
the number of plaintext bytes to be wrapped.
plaintextBytes
,
int
the number of buffers that the plaintext bytes are spread across.
numBuffers
)

Calculates the maximum size of the encrypted output buffer required to wrap the given plaintext bytes.

pack-priv static ConscryptAlpnSslEngine
newClientEngine(SSLEngine engine, BufferAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator)

Deprecated as a consequence of JdkApplicationProtocolNegotiator being deprecated.
pack-priv static ConscryptAlpnSslEngine
newServerEngine(SSLEngine engine, BufferAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator)

Deprecated as a consequence of JdkApplicationProtocolNegotiator being deprecated.
public final SSLEngineResult
unwrap(ByteBuffer[]
The array of source buffers with data to unwrap.
srcs
,
ByteBuffer[]
The array of destination buffers where the unwrapped data should be written.
dests
)

Implements io.netty5.handler.ssl.VectoredUnwrap.unwrap.

Similar to javax.net.ssl.SSLEngine#unwrap(ByteBuffer, ByteBuffer[]), but takes an array of input buffers.
Inherited from io.netty5.handler.ssl.JdkSslEngine:
beginHandshakecloseInboundcloseOutboundgetDelegatedTaskgetEnabledCipherSuitesgetEnabledProtocolsgetEnableSessionCreationgetHandshakeSessiongetHandshakeStatusgetNeedClientAuthgetNegotiatedApplicationProtocolgetPeerHostgetPeerPortgetSessiongetSSLParametersgetSupportedCipherSuitesgetSupportedProtocolsgetUseClientModegetWantClientAuthgetWrappedEngineisInboundDoneisOutboundDonesetEnabledCipherSuitessetEnabledProtocolssetEnableSessionCreationsetNeedClientAuthsetNegotiatedApplicationProtocolsetSSLParameterssetUseClientModesetWantClientAuthunwrapunwrapunwrapwrapwrapwrap

Field Detail

USE_BUFFER_ALLOCATORback to summary
private static final boolean USE_BUFFER_ALLOCATOR

Constructor Detail

ConscryptAlpnSslEngineback to summary
private ConscryptAlpnSslEngine(SSLEngine engine, BufferAllocator alloc, List<String> protocols)

Method Detail

calculateOutNetBufSizeback to summary
pack-priv final int calculateOutNetBufSize(int plaintextBytes, int numBuffers)

Calculates the maximum size of the encrypted output buffer required to wrap the given plaintext bytes. Assumes as a worst case that there is one TLS record per buffer.

Parameters
plaintextBytes:int

the number of plaintext bytes to be wrapped.

numBuffers:int

the number of buffers that the plaintext bytes are spread across.

Returns:int

the maximum size of the encrypted output buffer required for the wrap operation.

newClientEngineback to summary
pack-priv static ConscryptAlpnSslEngine newClientEngine(SSLEngine engine, BufferAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator)

Deprecated

as a consequence of JdkApplicationProtocolNegotiator being deprecated. See corresponding docs for further information.

newServerEngineback to summary
pack-priv static ConscryptAlpnSslEngine newServerEngine(SSLEngine engine, BufferAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator)

Deprecated

as a consequence of JdkApplicationProtocolNegotiator being deprecated. See corresponding docs for further information.

unwrapback to summary
public final SSLEngineResult unwrap(ByteBuffer[] srcs, ByteBuffer[] dests) throws SSLException

Implements io.netty5.handler.ssl.VectoredUnwrap.unwrap.

Doc from io.netty5.handler.ssl.VectoredUnwrap.unwrap.

Similar to javax.net.ssl.SSLEngine#unwrap(ByteBuffer, ByteBuffer[]), but takes an array of input buffers.

Parameters
srcs:ByteBuffer[]

The array of source buffers with data to unwrap.

dests:ByteBuffer[]

The array of destination buffers where the unwrapped data should be written.

Returns:SSLEngineResult

The SSLEngineResult of the unwrap operation.

Annotations
@Override
Exceptions
SSLException:
A problem was encountered during data processing that caused the javax.net.ssl.SSLEngine to abort.
io.netty5.handler.ssl back to summary

private final Class ConscryptAlpnSslEngine.BufferAdapter

extends AllocatedBuffer
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final ByteBuffer
private final Buffer

Constructor Summary

AccessConstructor and Description
pack-priv
BufferAdapter(BufferAllocator allocator, int capacity)

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer
nioBuffer()

Implements abstract org.conscrypt.AllocatedBuffer.nioBuffer.

Returns the ByteBuffer that backs this buffer.
public AllocatedBuffer
release()

Implements abstract org.conscrypt.AllocatedBuffer.release.

Returns the delegate ByteBuffer for reuse or garbage collection.
public AllocatedBuffer
retain()

Overrides org.conscrypt.AllocatedBuffer.retain.

Returns the current instance for backward compatibility.
Inherited from org.conscrypt.AllocatedBuffer:
wrap

Field Detail

bufferback to summary
private final ByteBuffer buffer
nettyBufferback to summary
private final Buffer nettyBuffer

Constructor Detail

BufferAdapterback to summary
pack-priv BufferAdapter(BufferAllocator allocator, int capacity)

Method Detail

nioBufferback to summary
public ByteBuffer nioBuffer()

Implements abstract org.conscrypt.AllocatedBuffer.nioBuffer.

Doc from org.conscrypt.AllocatedBuffer.nioBuffer.

Returns the ByteBuffer that backs this buffer.

Annotations
@Override
releaseback to summary
public AllocatedBuffer release()

Implements abstract org.conscrypt.AllocatedBuffer.release.

Doc from org.conscrypt.AllocatedBuffer.release.

Returns the delegate ByteBuffer for reuse or garbage collection.

Returns:AllocatedBuffer

this AllocatedBuffer instance

Annotations
@Override
retainback to summary
public AllocatedBuffer retain()

Overrides org.conscrypt.AllocatedBuffer.retain.

Doc from org.conscrypt.AllocatedBuffer.retain.

Returns the current instance for backward compatibility.

Annotations
@Override
io.netty5.handler.ssl back to summary

private final Class ConscryptAlpnSslEngine.BufferAllocatorAdapter

extends BufferAllocator
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final BufferAllocator

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public AllocatedBuffer
allocateDirectBuffer(int capacity)

Implements abstract org.conscrypt.BufferAllocator.allocateDirectBuffer.

Allocates a direct (i.e. non-heap) buffer with the given capacity.
Inherited from org.conscrypt.BufferAllocator:
unpooled

Field Detail

allocback to summary
private final BufferAllocator alloc

Constructor Detail

BufferAllocatorAdapterback to summary
pack-priv BufferAllocatorAdapter(BufferAllocator alloc)

Method Detail

allocateDirectBufferback to summary
public AllocatedBuffer allocateDirectBuffer(int capacity)

Implements abstract org.conscrypt.BufferAllocator.allocateDirectBuffer.

Doc from org.conscrypt.BufferAllocator.allocateDirectBuffer.

Allocates a direct (i.e. non-heap) buffer with the given capacity.

Annotations
@Override
io.netty5.handler.ssl back to summary

private final Class ConscryptAlpnSslEngine.ClientEngine

extends ConscryptAlpnSslEngine
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final JdkApplicationProtocolNegotiator.ProtocolSelectionListener

Constructor Summary

AccessConstructor and Description
pack-priv
ClientEngine(SSLEngine engine, BufferAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator)

Deprecated as a consequence of JdkApplicationProtocolNegotiator being deprecated.

Method Summary

Modifier and TypeMethod and Description
private void
Inherited from io.netty5.handler.ssl.ConscryptAlpnSslEngine:
calculateOutNetBufSizenewClientEnginenewServerEngineunwrap

Field Detail

protocolListenerback to summary
private final JdkApplicationProtocolNegotiator.ProtocolSelectionListener protocolListener

Constructor Detail

ClientEngineback to summary
pack-priv ClientEngine(SSLEngine engine, BufferAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator)

Deprecated

as a consequence of JdkApplicationProtocolNegotiator being deprecated. See corresponding docs for further information.

Method Detail

selectProtocolback to summary
private void selectProtocol() throws SSLException
io.netty5.handler.ssl back to summary

private final Class ConscryptAlpnSslEngine.ServerEngine

extends ConscryptAlpnSslEngine
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final JdkApplicationProtocolNegotiator.ProtocolSelector

Constructor Summary

AccessConstructor and Description
pack-priv
ServerEngine(SSLEngine engine, BufferAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator)

Deprecated as a consequence of JdkApplicationProtocolNegotiator being deprecated.

Method Summary

Modifier and TypeMethod and Description
private void
Inherited from io.netty5.handler.ssl.ConscryptAlpnSslEngine:
calculateOutNetBufSizenewClientEnginenewServerEngineunwrap

Field Detail

protocolSelectorback to summary
private final JdkApplicationProtocolNegotiator.ProtocolSelector protocolSelector

Constructor Detail

ServerEngineback to summary
pack-priv ServerEngine(SSLEngine engine, BufferAllocator alloc, JdkApplicationProtocolNegotiator applicationNegotiator)

Deprecated

as a consequence of JdkApplicationProtocolNegotiator being deprecated. See corresponding docs for further information.

Method Detail

selectProtocolback to summary
private void selectProtocol() throws SSLException