|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--spki.demo.KeyChainManager
spki.demo KeyChainManager class.
| Field Summary | |
private static String |
__ME
This class's full name. |
private HashDB |
authchain_db
the authorization-chain database object. |
private static String |
AUTHCHAIN_DBNAME
the authorization-chain database filename suffix. |
private String |
db_id
|
private static String |
DBPATH
databases's pathname prefix. |
private KeyChain |
keychain
|
private int |
keypool_size
|
private String |
passcode
|
| Constructor Summary | |
protected |
KeyChainManager()
Default constructor. |
|
KeyChainManager(KeyChain chain,
String oldcode,
String newcode,
int keypool_size)
Personalize an initialized key-chain. |
|
KeyChainManager(String chain_id,
String passcode,
int keypool_size)
Restore a personalized key-chain. |
| Method Summary | |
void |
addAuthChain(Sequence chain)
act as the wrapper for KeyChain.addAuthChain() and also add the new authorization chain to the local look-up cache for quick discovery later. |
private String |
buildAuthChainDBIndex(Principal issuer,
Tag capability)
create a look-up cache database key for the given authorizaiton chain, by combining the hash value of the root issuer's principal with the capability. |
private String |
buildAuthChainDBIndex(Sequence chain)
create a look-up database key for the given authorizaiton chain. |
private String |
buildDBname(String dbname)
|
private void |
closeDB()
to be used by the finalize() method only! |
protected void |
finalize()
|
Sequence |
getChain(Principal root_issuer,
Tag capability)
act as the wrapper for KeyChain.getAuthChain(), using the look-up cache to minimize authorization chain discovery time. |
private void |
openDB()
|
static Capability5Tuple |
reduce(Sequence chain)
reduce the given authorization chain into a single 5-tuple. |
Sequence |
register(RootIssuer issuer,
Tag capability)
register the key-chain with the given Issuer for the given capability. |
AuthorizationRequest |
request(Monitor monitor,
Principal root_issuer,
Tag capability)
act as the wrapper for KeyChain.request() and shorten the authorization chain discovery using the authorization chain look-up cache. |
RegistrationRequest |
request(PublicKey issuer,
Tag capability)
act as the wrapper for KeyChain.register(). |
Sequence |
transfer(Sequence chain,
RegistrationRequest request)
act as the wrapper for KeyChain.transfer(). |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static final String __ME
private KeyChain keychain
private String passcode
private int keypool_size
private static final String DBPATH
private static final String AUTHCHAIN_DBNAME
private HashDB authchain_db
private String db_id
| Constructor Detail |
protected KeyChainManager()
public KeyChainManager(KeyChain chain,
String oldcode,
String newcode,
int keypool_size)
throws SPKIException
public KeyChainManager(String chain_id,
String passcode,
int keypool_size)
throws SPKIException
| Method Detail |
protected void finalize()
public void addAuthChain(Sequence chain)
throws SPKIException
KeyChain.addAuthChain(String,Sequence),
buildAuthChainDBIndex(Sequence)
public AuthorizationRequest request(Monitor monitor,
Principal root_issuer,
Tag capability)
throws SPKIException
KeyChain.request(String,Principal,String,Sexp,Principal,Tag),
buildAuthChainDBIndex(Sequence)
public RegistrationRequest request(PublicKey issuer,
Tag capability)
throws SPKIException
KeyChain.register(String,PublicKey,Sexp,Tag)
public Sequence register(RootIssuer issuer,
Tag capability)
throws SPKIException
KeyChain.register(String,PublicKey,Sexp,Tag)
public Sequence getChain(Principal root_issuer,
Tag capability)
throws SPKIException
KeyChain.getAuthChain(String,String)
public Sequence transfer(Sequence chain,
RegistrationRequest request)
throws SPKIException
KeyChain.transfer(String,String,RegistrationRequest)
public static Capability5Tuple reduce(Sequence chain)
throws SPKIException
private void openDB()
throws SPKIException
private void closeDB()
throws SPKIException
private String buildDBname(String dbname)
throws SPKIException
private String buildAuthChainDBIndex(Sequence chain)
throws SPKIException
buildAuthChainDBIndex(Principal,Tag)
private String buildAuthChainDBIndex(Principal issuer,
Tag capability)
throws SPKIException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||