public abstract class KeyExchange extends Protocol
ASYM_ENCRYPT
.Modifier and Type | Field and Description |
---|---|
protected Address |
local_addr |
after_creation_hook, down_prot, ergonomics, id, log, name, stack, stats, up_prot
Constructor and Description |
---|
KeyExchange() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
down(Event evt)
An event is to be sent down the stack.
|
abstract void |
fetchSecretKeyFrom(Address target)
Needs to fetch the secret key from a given destination (usually the key server).
|
protected <T extends Protocol> |
findProtocolAbove(java.lang.Class<? extends Protocol> clazz) |
protected Tuple<javax.crypto.SecretKey,byte[]> |
getSecretKeyFromAbove()
Fetches the secret key from a protocol above us
|
protected void |
handleView(View view) |
java.util.List<java.lang.Integer> |
providedUpServices()
List of events that are provided to layers above (they will be handled when sent down from above)
|
java.util.List<java.lang.Integer> |
requiredUpServices()
List of events that are required to be answered by some layer above
|
protected void |
setSecretKeyAbove(Tuple<javax.crypto.SecretKey,byte[]> key)
Sets the secret key in a protocol above us
|
accept, afterCreationHook, destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, init, isErgonomics, level, parse, printStats, providedDownServices, requiredDownServices, resetStatistics, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, start, statsEnabled, stop, up, up
protected Address local_addr
public java.util.List<java.lang.Integer> providedUpServices()
Protocol
providedUpServices
in class Protocol
public java.util.List<java.lang.Integer> requiredUpServices()
Protocol
requiredUpServices
in class Protocol
public abstract void fetchSecretKeyFrom(Address target) throws java.lang.Exception
setSecretKeyAbove(Tuple)
.target
- The member from which to fetch the secret keyjava.lang.Exception
public java.lang.Object down(Event evt)
Protocol
down_prot.down()
. In case of a GET_ADDRESS event (which tries to
retrieve the stack's address from one of the bottom layers), the layer may need to send
a new response event back up the stack using up_prot.up()
.protected void handleView(View view)
protected Tuple<javax.crypto.SecretKey,byte[]> getSecretKeyFromAbove()
protected void setSecretKeyAbove(Tuple<javax.crypto.SecretKey,byte[]> key)
key
- The secret key and its versionCopyright © 1998-2020 Red Hat. All Rights Reserved.