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 java.net.InetAddress |
bind_addr |
protected java.security.KeyStore |
key_store |
protected java.lang.String |
keystore_name |
protected java.lang.String |
keystore_password |
protected java.lang.String |
keystore_type |
protected int |
port |
protected int |
port_range |
protected boolean |
require_client_authentication |
protected java.lang.String |
secret_key_algorithm |
protected SSL_KEY_EXCHANGE.SessionVerifier |
session_verifier |
protected java.lang.String |
session_verifier_arg |
protected java.lang.String |
session_verifier_class |
protected int |
socket_timeout |
protected javax.net.ssl.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 javax.net.ssl.SSLServerSocket |
createServerSocket() |
protected javax.net.ssl.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 javax.net.ssl.SSLContext |
getContext() |
protected void |
handleView(View view) |
void |
init()
Called after instance has been created (null constructor) and before protocol is started.
|
protected static java.lang.String |
print16(java.security.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() |
java.lang.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 java.net.InetAddress bind_addr
protected int port_range
protected java.lang.String keystore_name
protected java.lang.String keystore_type
protected java.lang.String keystore_password
protected java.lang.String secret_key_algorithm
protected boolean require_client_authentication
protected int socket_timeout
protected java.lang.String session_verifier_class
protected java.lang.String session_verifier_arg
protected javax.net.ssl.SSLServerSocket srv_sock
protected Runner srv_sock_handler
protected java.security.KeyStore key_store
protected View view
protected SSL_KEY_EXCHANGE.SessionVerifier session_verifier
public void init() throws java.lang.Exception
Protocol
public void start() throws java.lang.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
java.lang.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 java.lang.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 java.lang.Exception
KeyExchange
KeyExchange.setSecretKeyAbove(Tuple)
.fetchSecretKeyFrom
in class KeyExchange
target
- The member from which to fetch the secret keyjava.lang.Exception
protected void handleView(View view)
handleView
in class KeyExchange
protected void accept()
protected void becomeKeyserver() throws java.lang.Exception
java.lang.Exception
protected void stopKeyserver()
protected javax.net.ssl.SSLServerSocket createServerSocket() throws java.lang.Exception
java.lang.Exception
protected javax.net.ssl.SSLSocket createSocketTo(Address target) throws java.lang.Exception
java.lang.Exception
protected javax.net.ssl.SSLContext getContext() throws java.lang.Exception
java.lang.Exception
protected static java.lang.String print16(java.security.PublicKey pub_key)
Copyright © 1998-2020 Red Hat. All Rights Reserved.