public class SSLService extends Object
| Constructor and Description |
|---|
SSLService(SSLConfig config) |
| Modifier and Type | Method and Description |
|---|---|
Handshake |
createSSLEngine(AsynchronousSocketChannel socketChannel) |
void |
doHandshake(Handshake handshakeModel)
纯异步实现的SSL握手,
在执行doHandshake期间必须保证当前通道无数据读写正在执行。
若触发了数据读写,也应立马终止doHandshake方法
|
protected ByteBuffer |
enlargeApplicationBuffer(SSLEngine engine,
ByteBuffer buffer) |
protected ByteBuffer |
enlargeBuffer(ByteBuffer buffer,
int sessionProposedCapacity)
Compares sessionProposedCapacity with buffer's capacity.
|
protected ByteBuffer |
enlargePacketBuffer(SSLSession session,
ByteBuffer buffer) |
protected ByteBuffer |
handleBufferUnderflow(SSLSession session,
ByteBuffer buffer) |
public SSLService(SSLConfig config)
public Handshake createSSLEngine(AsynchronousSocketChannel socketChannel)
public void doHandshake(Handshake handshakeModel)
handshakeModel - 握手信息protected ByteBuffer enlargePacketBuffer(SSLSession session, ByteBuffer buffer)
protected ByteBuffer enlargeApplicationBuffer(SSLEngine engine, ByteBuffer buffer)
protected ByteBuffer enlargeBuffer(ByteBuffer buffer, int sessionProposedCapacity)
buffer - - the buffer to be enlarged.sessionProposedCapacity - - the minimum size of the new buffer, proposed by SSLSession.protected ByteBuffer handleBufferUnderflow(SSLSession session, ByteBuffer buffer)
Copyright © 2019. All rights reserved.