Modifier and Type | Field and Description |
---|---|
protected String |
host |
protected int |
port |
static String[] |
PREFERRED_CIPHER_NAMES
Preferred encryption cipher to use for SSL sockets.
|
protected SSLContext |
sslContext |
protected SSLEngine |
sslEngine |
Modifier and Type | Method and Description |
---|---|
protected abstract SSLContext |
createSSLContext()
Implemented by Server/Client to set up correct ssl context.
|
protected abstract SSLEngine |
createSSLEngine() |
protected SSLContext |
getSSLContext() |
protected SSLEngine |
getSSLEngine() |
void |
initialize()
This can be called to initialize the SSLEngine, etc.
|
byte[] |
input()
performs a blocking read.
|
protected void |
input(byte[] bs,
int len,
boolean bHandshakeOnly) |
protected void |
log(String msg) |
void |
output(byte[] bs,
int offset,
int len)
This is the only way to send data to the client computer.
|
protected void |
receiveInput(byte[] bs,
int offset,
int len)
This is unencrypted data from the client, called from input(..)
|
void |
resetSSL()
This will reset and cause the SSL handshaking to have to be done again.
|
protected abstract void |
sendOutput(byte[] bs,
int offset,
int len,
boolean bHandshakeOnly)
This is the encrypted data that needs to go to the client.
|
public static final String[] PREFERRED_CIPHER_NAMES
protected SSLContext sslContext
protected SSLEngine sslEngine
protected final String host
protected final int port
public SSLBase(String host, int port)
protected SSLContext getSSLContext() throws Exception
Exception
public void resetSSL() throws Exception
Exception
public void initialize() throws Exception
Exception
public void output(byte[] bs, int offset, int len) throws Exception
Exception
protected void input(byte[] bs, int len, boolean bHandshakeOnly) throws Exception
Exception
protected abstract SSLContext createSSLContext() throws Exception
Exception
protected abstract void sendOutput(byte[] bs, int offset, int len, boolean bHandshakeOnly) throws Exception
Exception
protected void receiveInput(byte[] bs, int offset, int len) throws Exception
Exception
protected void log(String msg)
Copyright © 1999–2019 ViaOA. All rights reserved.