public class KeyManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static String | DEFAULT_KEYDIRDefault keydir |
static String | KEYFILE_PRIVATE_ENCPath to the private enc key file |
static String | KEYFILE_PRIVATE_SIGNINGPath to the private signing key file |
static String | KEYFILE_PUBLIC_ENCPath to the public enc key file |
static String | KEYFILE_PUBLIC_SIGNINGPath to the public signing key file |
static String | PROP_KEYDIRProperty key for keydir |
| Constructor and Description |
|---|
KeyManager(RouterContext context) |
| Modifier and Type | Method and Description |
|---|---|
LeaseSetKeys | getKeys(Destination dest)Get the keys registered for a destination. |
LeaseSetKeys | getKeys(Hash dest)Client session lease set keys. |
PrivateKey | getPrivateKey()Router key |
PublicKey | getPublicKey()Router key |
SigningPrivateKey | getSigningPrivateKey()Router key |
SigningPublicKey | getSigningPublicKey()Router key |
void | registerKeys(Destination dest,
SigningPrivateKey leaseRevocationPrivateKey,
List<PrivateKey> endpointDecryptionKeys)Client with multiple keys |
void | registerKeys(Destination dest,
SigningPrivateKey leaseRevocationPrivateKey,
PrivateKey endpointDecryptionKey)Client with a single key |
void | setKeys(PublicKey key1,
PrivateKey key2,
SigningPublicKey key3,
SigningPrivateKey key4)Configure the router's keys. |
LeaseSetKeys | unregisterKeys(Destination dest)Unregister keys for a destination, removing them from memory. |
public static final String DEFAULT_KEYDIR
public static final String KEYFILE_PRIVATE_ENC
public static final String KEYFILE_PRIVATE_SIGNING
public static final String KEYFILE_PUBLIC_ENC
public static final String KEYFILE_PUBLIC_SIGNING
public static final String PROP_KEYDIR
public KeyManager(RouterContext context)
public LeaseSetKeys getKeys(Destination dest)
dest - the destination to look uppublic LeaseSetKeys getKeys(Hash dest)
public PrivateKey getPrivateKey()
public PublicKey getPublicKey()
public SigningPrivateKey getSigningPrivateKey()
public SigningPublicKey getSigningPublicKey()
public void registerKeys(Destination dest, SigningPrivateKey leaseRevocationPrivateKey, List<PrivateKey> endpointDecryptionKeys)
leaseRevocationPrivateKey - unused, may be nullpublic void registerKeys(Destination dest, SigningPrivateKey leaseRevocationPrivateKey, PrivateKey endpointDecryptionKey)
leaseRevocationPrivateKey - unused, may be nullpublic void setKeys(PublicKey key1, PrivateKey key2, SigningPublicKey key3, SigningPrivateKey key4)
public LeaseSetKeys unregisterKeys(Destination dest)
dest - the destination whose keys should be unregistered