public class SSL_KEY_EXCHANGE extends KeyExchange
SSLServerSocket
on a given port
and members fetch the secret key by creating a SSLSocket
to the key server. The key server
authenticates the client (and vice versa) and then sends the secret key over this encrypted channel.
Modifier and Type | Class and Description |
---|---|
static interface |
SSL_KEY_EXCHANGE.SessionVerifier |
protected static class |
SSL_KEY_EXCHANGE.Type |
Modifier and Type | Field and Description |
---|---|
protected InetAddress |
bind_addr |
protected KeyStore |
key_store |
protected String |
keystore_name |
protected String |
keystore_password |
protected String |
keystore_type |
protected int |
port |
protected int |
port_range |
protected boolean |
require_client_authentication |
protected String |
secret_key_algorithm |
protected SSL_KEY_EXCHANGE.SessionVerifier |
session_verifier |
protected String |
session_verifier_arg |
protected String |
session_verifier_class |
protected int |
socket_timeout |
protected SSLServerSocket |
srv_sock |
protected Runner |
srv_sock_handler |
protected View |
view |
local_addr
after_creation_hook, down_prot, ergonomics, id, log, name, stack, stats, up_prot
Constructor and Description |
---|
SSL_KEY_EXCHANGE() |
Modifier and Type | Method and Description |
---|---|
protected void |
accept() |
protected void |
becomeKeyserver() |
protected SSLServerSocket |
createServerSocket() |
protected SSLSocket |
createSocketTo(Address target) |
void |
destroy()
This method is called on a
Channel.close() . |
void |
fetchSecretKeyFrom(Address target)
Needs to fetch the secret key from a given destination (usually the key server).
|
protected SSLContext |
getContext() |
protected void |
handleView(View view) |
void |
init()
Called after instance has been created (null constructor) and before protocol is started.
|
protected static String |
print16(PublicKey pub_key) |
void |
start()
This method is called on a
Channel.connect(String) . |
void |
stop()
This method is called on a
Channel.disconnect() . |
protected void |
stopKeyserver() |
Object |
up(Event evt)
An event was received from the layer below.
|
down, findProtocolAbove, getSecretKeyFromAbove, providedUpServices, requiredUpServices, setSecretKeyAbove
accept, afterCreationHook, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, printStats, providedDownServices, requiredDownServices, resetStatistics, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled, up
protected int port
protected InetAddress bind_addr
protected int port_range
protected String keystore_name
protected String keystore_type
protected String keystore_password
protected String secret_key_algorithm
protected boolean require_client_authentication
protected int socket_timeout
protected String session_verifier_class
protected String session_verifier_arg
protected SSLServerSocket srv_sock
protected Runner srv_sock_handler
protected KeyStore key_store
protected View view
protected SSL_KEY_EXCHANGE.SessionVerifier session_verifier
public void init() throws Exception
Protocol
public void start() throws Exception
Protocol
Channel.connect(String)
. Starts work.
Protocols are connected and queues are ready to receive events.
Will be called from bottom to top. This call will replace
the START and START_OK events.start
in class Protocol
Exception
- Thrown if protocol cannot be started successfully. This will cause the ProtocolStack
to fail, so Channel.connect(String)
will throw an exceptionpublic void stop()
Protocol
Channel.disconnect()
. Stops work (e.g. by closing multicast socket).
Will be called from top to bottom. This means that at the time of the method invocation the
neighbor protocol below is still working. This method will replace the
STOP, STOP_OK, CLEANUP and CLEANUP_OK events. The ProtocolStack guarantees that
when this method is called all messages in the down queue will have been flushedpublic void destroy()
Protocol
Channel.close()
.
Does some cleanup; after the call the VM will terminatepublic Object up(Event evt)
Protocol
down_prot.down()
or c) the event (or another event) is sent up
the stack using up_prot.up()
.public void fetchSecretKeyFrom(Address target) throws Exception
KeyExchange
KeyExchange.setSecretKeyAbove(Tuple)
.fetchSecretKeyFrom
in class KeyExchange
target
- The member from which to fetch the secret keyException
protected void handleView(View view)
handleView
in class KeyExchange
protected void accept()
protected void stopKeyserver()
protected SSLServerSocket createServerSocket() throws Exception
Exception
protected SSLSocket createSocketTo(Address target) throws Exception
Exception
protected SSLContext getContext() throws Exception
Exception
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.